* gcc.c-torture/execute/20010119-1.c: New test.

From-SVN: r39138
This commit is contained in:
Jakub Jelinek 2001-01-19 19:03:44 +01:00 committed by Jakub Jelinek
parent cb9e9d8dd1
commit fa7aa1feb6
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2001-01-19 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20010119-1.c: New test.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/vbase5.C: New test.

View File

@ -0,0 +1,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);
}