re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr27236.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 static inline int inline_read(volatile int *mem)
5 {
6 return *mem;
7 }
8 int foo_read(volatile int *mem)
9 {
10 return inline_read(mem);
11 }
12 unsigned int foo(volatile int *mem)
13 {
14 foo_read(mem);
15 return foo_read(mem);
16 }
17
18 /* { dg-final { scan-tree-dump-times "foo_read" 5 "optimized" } } */
19 /* { dg-final { cleanup-tree-dump "optimized" } } */