Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/pr59722.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/pr59722.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,36 @@ +/* PR ipa/59722 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fcompare-debug" } */ + +extern void abrt (const char *, int) __attribute__((noreturn)); +void baz (int *, int *); + +static inline int +bar (void) +{ + return 1; +} + +static inline void +foo (int *x, int y (void)) +{ + while (1) + { + int a = 0; + if (*x) + { + baz (x, &a); + while (a && !y ()) + ; + break; + } + abrt ("", 1); + } +} + +void +test (int x) +{ + foo (&x, bar); + foo (&x, bar); +}