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-20040917-1.c
blobdf4c7943c07651c96b25854ebddb15cc9f26d18c
1 /*
2 20040917-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 /* submitted by kenneth zadeck */
13 static int test_var;
15 /* the idea here is that not only is inlinable, inlinable but since it
16 is static, the cgraph node will not be marked as output. The
17 current version of the code ignores these cgraph nodes. */
19 void not_inlinable();
21 static void
22 inlinable ()
24 test_var = -10;
27 void
28 not_inlinable ()
30 inlinable();
33 void
34 testTortureExecute (void)
36 test_var = 10;
37 /* Variable test_var should be considered call-clobbered by the call
38 to not_inlinable(). */
39 not_inlinable ();
40 if (test_var == 10)
41 ASSERT (0);
42 return;