Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / execute / loop-12.c
blob1e340990cdd5f784e7808c54e8d5953307330c21
1 /* Checks that pure functions are not treated as const. */
3 char *p;
5 static int __attribute__ ((pure))
6 is_end_of_statement (void)
8 return *p == '\n' || *p == ';' || *p == '!';
11 void foo (void)
13 /* The is_end_of_statement call was moved out of the loop at one stage,
14 resulting in an endless loop. */
15 while (!is_end_of_statement ())
16 p++;
19 int
20 main (void)
22 p = "abc\n";
23 foo ();
24 return 0;