Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-require-effective-target freorder } */ /* { dg-options "-O2 -freorder-blocks-and-partition" } */ #include <string.h> #define SIZE 1000 int t0 = 0; const char *t2[SIZE]; char buf[SIZE]; void foo (void) { char *s = buf; t0 = 1; for (;;) { if (*s == '\0') break; else { t2[t0] = s; t0++; } *s++ = '\0'; } t2[t0] = NULL; } int main () { strcpy (buf, "hello"); foo (); return 0; }