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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [991216-2.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
#include <stdarg.h>
2
 
3
#define VALUE 0x123456789abcdefLL
4
#define AFTER 0x55
5
 
6
void
7
test (int n, ...)
8
{
9
  va_list ap;
10
  int i;
11
 
12
  va_start (ap, n);
13
  for (i = 2; i <= n; i++)
14
    {
15
      if (va_arg (ap, int) != i)
16
        abort ();
17
    }
18
 
19
  if (va_arg (ap, long long) != VALUE)
20
    abort ();
21
 
22
  if (va_arg (ap, int) != AFTER)
23
    abort ();
24
 
25
  va_end (ap);
26
}
27
 
28
int
29
main ()
30
{
31
  test (1, VALUE, AFTER);
32
  test (2, 2, VALUE, AFTER);
33
  test (3, 2, 3, VALUE, AFTER);
34
  test (4, 2, 3, 4, VALUE, AFTER);
35
  test (5, 2, 3, 4, 5, VALUE, AFTER);
36
  test (6, 2, 3, 4, 5, 6, VALUE, AFTER);
37
  test (7, 2, 3, 4, 5, 6, 7, VALUE, AFTER);
38
  test (8, 2, 3, 4, 5, 6, 7, 8, VALUE, AFTER);
39
  exit (0);
40
}

powered by: WebSVN 2.1.0

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