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-941031-1.c
blob03a81c06c0ee160a1dd58749bdfab88e1844066f
1 /*
2 941031-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 typedef long mpt;
13 int
14 f (mpt us, mpt vs)
16 long aus;
17 long avs;
19 aus = us >= 0 ? us : -us;
20 avs = vs >= 0 ? vs : -vs;
22 if (aus < avs)
24 long t = aus;
25 aus = avs;
26 avs = aus;
29 return avs;
32 void
33 testTortureExecute (void)
35 if (f ((mpt) 3, (mpt) 17) != 17)
36 ASSERT (0);
37 return;