summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr37341.c
blob: adbf0c7e4840615f969f5b2d948559d2a861f159 (plain)
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
34
35
/* PR rtl-optimization/37341 */

short int a;
int b;

static inline int
f1 (int x, int y)
{
  if (x < 0 || y < 0 || y >= sizeof (int) * 8 || x > (1 >> y))
    return x;
}

static inline unsigned int
f2 (int x, int y)
{
  if (y <= 0 && x && y < __INT_MAX__ / x)
    return x;
  return x * y;
}

int
f3 (void)
{
  return (signed char) 0xb6;
}

unsigned int
f4 (unsigned int x)
{
  while (1)
    {
      if ((f2 (f3 (), (f1 (a, b)))) < x)
	return 1;
    }
}