1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* { dg-options "-O2 -fdump-tree-optimized-blocks" } */ int a[8]; __attribute__ ((noinline)) int t() { int i; for (i = 0; i < 3; i++) if (a[i]) break; return i; } main () { int i; for (i = 0; i < 1000; i++) t (); return 0; } /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */