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