blob: 099b2810a0c47ae4d5f9c93b9543fe7e5c6d60d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
unsigned int
test(unsigned int quant)
{
unsigned int sum = 0;
for (unsigned int i = 0; i < quant; ++i)
sum += quant;
return sum;
}
/* A single basic-block should remain (computing and
returning quant * quant). */
/* { dg-final { scan-tree-dump-times "bb" 1 "optimized" } } */
|