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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [931004-4.c] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
#include <stdarg.h>
2
 
3
struct tiny
4
{
5
  short c;
6
};
7
 
8
f (int n, ...)
9
{
10
  struct tiny x;
11
  int i;
12
 
13
  va_list ap;
14
  va_start (ap,n);
15
  for (i = 0; i < n; i++)
16
    {
17
      x = va_arg (ap,struct tiny);
18
      if (x.c != i + 10)
19
        abort();
20
    }
21
  {
22
    long x = va_arg (ap, long);
23
    if (x != 123)
24
      abort();
25
  }
26
  va_end (ap);
27
}
28
 
29
main ()
30
{
31
  struct tiny x[3];
32
  x[0].c = 10;
33
  x[1].c = 11;
34
  x[2].c = 12;
35
  f (3, x[0], x[1], x[2], (long) 123);
36
  exit(0);
37
}
38
 

powered by: WebSVN 2.1.0

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