blob: 61fcb2dacc801953763a225ede39ac17263845a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
930208-1.c from the execute part of the gcc torture suite.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
// TODO: Enable when sdcc supports union!
#if 0
typedef union {
long l;
struct { char b3, b2, b1, b0; } c;
} T;
f (T u)
{
++u.c.b0;
++u.c.b3;
return (u.c.b1 != 2 || u.c.b2 != 2);
}
#endif
void
testTortureExecute (void)
{
#if 0
T u;
u.c.b1 = 2;
u.c.b2 = 2;
u.c.b0 = ~0;
u.c.b3 = ~0;
if (f (u))
ASSERT(0);
return;
#endif
}
|