IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / no-strict-overflow-6.c
blob43200bb20bc4bcdc726d4018c19123697a4f115b
1 /* { dg-do compile } */
2 /* { dg-options "-fno-strict-overflow -O2 -fdump-tree-optimized" } */
4 /* Source: Ian Lance Taylor. */
6 /* VRP test. We can not simplify the conditional when not using
7 strict overflow semantics. We don't test this with
8 -fstrict-overflow because it turns into an infinite loop. That is
9 OK but it would also be OK to not do that. */
11 int
12 foo ()
14 int i, bits;
15 for (i = 1, bits = 1; i > 0; i += i)
16 ++bits;
17 return bits;
20 /* { dg-final { scan-tree-dump "return bits" "optimized" } } */
21 /* { dg-final { cleanup-tree-dump "optimized" } } */