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-20030117-1.c
blobaa189a745b2f1a2fff0f94e4c6690cea0f4c6c43
1 /*
2 20030117-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 int foo (int, int, int);
12 int bar (int, int, int);
14 void
15 testTortureExecute (void)
17 if (foo (5, 10, 21) != 12)
18 ASSERT (0);
20 if (bar (9, 12, 15) != 150)
21 ASSERT (0);
23 return;
26 int foo (int x, int y, int z)
28 return (x + y + z) / 3;
31 int bar (int x, int y, int z)
33 return foo (x * x, y * y, z * z);