PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20100827-1.c
blob8a531b99bb19dc40e9ea88d34903df4ae1b9d8f5
1 extern void abort (void);
2 int __attribute__((noinline,noclone))
3 foo (char *p)
5 int h = 0;
6 do
8 if (*p == '\0')
9 break;
10 ++h;
11 if (p == 0)
12 abort ();
13 ++p;
15 while (1);
16 return h;
18 int main()
20 if (foo("a") != 1)
21 abort ();
22 return 0;