2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20031216-1.c
blob7c706d86bea1db7eb5bab4d30618482ef7eb5532
1 /* This used to abort due to a loop bug on s390*. */
3 /* { dg-do run } */
4 /* { dg-options "-O2" } */
5 /* { dg-options "-O2 -fPIC" { target s390*-*-* } } */
7 extern void abort (void);
9 int count = 0;
10 char *str;
12 void test (int flag)
14 char *p;
16 for (;;)
18 if (count > 5)
19 return;
21 p = "test";
23 if (flag)
24 count++;
26 str = p;
30 int main (void)
32 test (1);
34 if (str[0] != 't')
35 abort ();
37 return 0;