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-pr33779-2.c
blob21db1bf30adc3436f51c6afb1699e8b803e0c079
1 /*
2 pr33779-2.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 int foo(long int i)
13 return ((int)((unsigned long)(i + 1) * 4)) / 4;
16 void
17 testTortureExecute (void)
19 #if !(defined (__GNUC__) && defined (__GNUC_MINOR__) && (__GNUC__ < 5 && __GNUC_MINOR__ < 4))
20 if (foo(0x3fffffff) != 0)
21 ASSERT (0);
22 return;
23 #endif