1 /*
2    20080506-1.c from the execute part of the gcc torture tests.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 /* PR middle-end/36137 */
12 
13 #define MIN(a, b) ((a) < (b) ? (a) : (b))
14 #define MAX(a, b) ((a) > (b) ? (a) : (b))
15 
16 void
testTortureExecute(void)17 testTortureExecute (void)
18 {
19 #if !(defined (__GNUC__) && (__GNUC__ < 5))
20   unsigned int u;
21   int i = -1;
22 
23   u = MAX ((unsigned int) MAX (i, 0), 1);
24   if (u != 1)
25     ASSERT (0);
26 
27   u = MIN ((unsigned int) MAX (i, 0), (unsigned int) i);
28   if (u != 0)
29     ASSERT (0);
30   return;
31 #endif
32 }
33 
34