gcc/testsuite/gcc.c-torture/execute/p18298.c
raw| 1 | /* { dg-options "-fgnu89-inline" } */ |
| 2 | |
| 3 | #include <stdbool.h> |
| 4 | #include <stdlib.h> |
| 5 | extern void abort (void); |
| 6 | int strcmp (const char*, const char*); |
| 7 | char s[2048] = "a"; |
| 8 | inline bool foo(const char *str) { |
| 9 | return !strcmp(s,str); |
| 10 | } |
| 11 | int main() { |
| 12 | int i = 0; |
| 13 | while(!(foo(""))) { |
| 14 | i ++; |
| 15 | s[0] = '\0'; |
| 16 | if (i>2) |
| 17 | abort (); |
| 18 | } |
| 19 | return 0; |
| 20 | } |
| 21 |