struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20030914-1.c
blob8fe615c329f390e2052ad898a976933d1152bb09
1 /*
2 20030914-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 // TODO: Enable when sdcc supports long double!
12 #if 0
13 /* On IRIX 6, PB is passed partially in registers and partially on the
14 stack, with an odd number of words in the register part. Check that
15 the long double stack argument (PC) is still accessed properly. */
17 struct s { int val[16]; };
19 long double f (int pa, struct s pb, long double pc)
21 int i;
23 for (i = 0; i < 16; i++)
24 pc += pb.val[i];
25 return pc;
27 #endif
29 void
30 testTortureExecute (void)
32 #if 0
33 struct s x;
34 int i;
36 for (i = 0; i < 16; i++)
37 x.val[i] = i + 1;
38 if (f (1, x, 10000.0L) != 10136.0L)
39 ASSERT (0);
40 return;
41 #endif