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-14.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
va_list global;
4
 
5
void vat(va_list param, ...)
6
{
7
  va_list local;
8
 
9
  va_start (local, param);
10
  va_copy (global, local);
11
  va_copy (param, local);
12
  if (va_arg (local, int) != 1)
13
    abort();
14
  va_end (local);
15
  if (va_arg (global, int) != 1)
16
    abort();
17
  va_end (global);
18
  if (va_arg (param, int) != 1)
19
    abort();
20
  va_end (param);
21
 
22
  va_start (param, param);
23
  va_start (global, param);
24
  va_copy (local, param);
25
  if (va_arg (local, int) != 1)
26
    abort();
27
  va_end (local);
28
  va_copy (local, global);
29
  if (va_arg (local, int) != 1)
30
    abort();
31
  va_end (local);
32
  if (va_arg (global, int) != 1)
33
    abort();
34
  va_end (global);
35
  if (va_arg (param, int) != 1)
36
    abort();
37
  va_end (param);
38
}
39
 
40
int main(void)
41
{
42
  va_list t;
43
  vat (t, 1);
44
  exit (0);
45
}

powered by: WebSVN 2.1.0

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