Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-950710-1.c
blobc1244e3f5668b3b532d8f110959a1fc9e2862a4f
1 /*
2 950710-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 // TODO: Enable when sdcc supports struct return!
12 #if 0
13 struct twelve
15 int a;
16 int b;
17 int c;
20 struct pair
22 int first;
23 int second;
26 struct pair
27 g ()
29 struct pair p;
30 return p;
33 static void
34 f ()
36 int i;
37 for (i = 0; i < 1; i++)
39 int j;
40 for (j = 0; j < 1; j++)
42 if (0)
44 int k;
45 for (k = 0; k < 1; k++)
47 struct pair e = g ();
50 else
52 struct twelve a, b;
53 if ((((char *) &b - (char *) &a) < 0
54 ? (-((char *) &b - (char *) &a))
55 : ((char *) &b - (char *) &a)) < sizeof (a))
56 ASSERT (0);
61 #endif
63 void
64 testTortureExecute (void)
66 #if 0
67 f ();
68 return;
69 #endif