OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [va-arg-19.c] - Blame information for rev 717

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
#include <stdarg.h>
2
 
3
typedef int TYPE;
4
 
5
void vafunction (char *dummy, ...)
6
{
7
  va_list ap;
8
 
9
  va_start(ap, dummy);
10
  if (va_arg (ap, TYPE) != 1)
11
    abort();
12
  if (va_arg (ap, TYPE) != 2)
13
    abort();
14
  if (va_arg (ap, TYPE) != 3)
15
    abort();
16
  if (va_arg (ap, TYPE) != 4)
17
    abort();
18
  if (va_arg (ap, TYPE) != 5)
19
    abort();
20
  if (va_arg (ap, TYPE) != 6)
21
    abort();
22
  if (va_arg (ap, TYPE) != 7)
23
    abort();
24
  if (va_arg (ap, TYPE) != 8)
25
    abort();
26
  if (va_arg (ap, TYPE) != 9)
27
    abort();
28
  va_end(ap);
29
}
30
 
31
 
32
int main (void)
33
{
34
  vafunction( "", 1, 2, 3, 4, 5, 6, 7, 8, 9 );
35
  exit(0);
36
  return 0;
37
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.