diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/p18298.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/p18298.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/p18298.c b/gcc/testsuite/gcc.c-torture/execute/p18298.c new file mode 100644 index 00000000000..5aff51f5fab --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/p18298.c @@ -0,0 +1,18 @@ +#include <stdbool.h> +#include <stdlib.h> +int strcmp (const char*, const char*); +char s[2048] = "a"; +inline bool foo(const char *str) { + return !strcmp(s,str); +} +int main() { +int i = 0; + while(!(foo(""))) { + i ++; + s[0] = '\0'; + if (i>2) + abort (); + } + return 0; +} + |