summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20010119-1.c
blob: c2a691a39e729b92de292967d49dd78a386f6332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifdef __OPTIMIZE__
extern void undef (void);

void bar (unsigned x) { }
void baz (unsigned x) { }

extern inline void foo (int a, int b)
{
  int c = 0;
  while (c++ < b)
    (__builtin_constant_p (a) ? ((a) > 20000 ? undef () : bar (a)) : baz (a));
}
#else
void foo (int a, int b)
{
}
#endif

int main (void)
{
  foo(10, 100);
  exit (0);
}