summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/980608-1.c
blob: b34d1374903cbc690ed17dde44d6cc29d93d230f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdarg.h>

void f1(int a,int b,int c,int d,int e, int f,int g,int h,int i,int j, int k,int
l,int m,int n,int o)
{
    return;
}

inline void debug(const char *msg,...)
{
    va_list ap;
    va_start( ap, msg );

    f1(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);

    if ( va_arg(ap,int) != 101)
        abort();
    if ( va_arg(ap,int) != 102)
        abort();
    if ( va_arg(ap,int) != 103)
        abort();
    if ( va_arg(ap,int) != 104)
        abort();
    if ( va_arg(ap,int) != 105)
        abort();
    if ( va_arg(ap,int) != 106)
        abort();

    va_end( ap );
}

int main(void)
{
  debug("%d %d %d  %d %d %d\n", 101, 102, 103, 104, 105, 106);
  exit(0);
}