2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / bb-reorg.c
blobf850c9bfd1e144b3834a88556facd896bd3be13e
1 /* { dg-require-effective-target freorder } */
2 /* { dg-options "-O2 -freorder-blocks-and-partition" } */
4 #include <string.h>
6 #define SIZE 1000
7 int t0 = 0;
8 const char *t2[SIZE];
9 char buf[SIZE];
11 void
12 foo (void)
14 char *s = buf;
15 t0 = 1;
17 for (;;)
19 if (*s == '\0')
20 break;
21 else
23 t2[t0] = s;
24 t0++;
26 *s++ = '\0';
28 t2[t0] = NULL;
32 int
33 main ()
35 strcpy (buf, "hello");
36 foo ();
37 return 0;