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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr44575.c] - Blame information for rev 297

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR target/44575 */
2
 
3
#include <stdarg.h>
4
 
5
int fails = 0;
6
struct S { float a[3]; };
7
struct S a[5];
8
 
9
void
10
check (int z, ...)
11
{
12
  struct S arg, *p;
13
  va_list ap;
14
  int j = 0, k = 0;
15
  int i;
16
  va_start (ap, z);
17
  for (i = 2; i < 4; ++i)
18
    {
19
      p = 0;
20
      j++;
21
      k += 2;
22
      switch ((z << 4) | i)
23
        {
24
        case 0x12:
25
        case 0x13:
26
          p = &a[2];
27
          arg = va_arg (ap, struct S);
28
          break;
29
        default:
30
          ++fails;
31
          break;
32
        }
33
      if (p && p->a[2] != arg.a[2])
34
        ++fails;
35
      if (fails)
36
        break;
37
    }
38
  va_end (ap);
39
}
40
 
41
int
42
main ()
43
{
44
  a[2].a[2] = -49026;
45
  check (1, a[2], a[2]);
46
  if (fails)
47
    abort ();
48
  return 0;
49
}

powered by: WebSVN 2.1.0

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