]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-store-ccp-3.c
1 /* { dg-do compile } */
2 /* Skipped on MIPS GNU/Linux target because __PIC__ can be
3 defined for executables as well as shared libraries. */
4 /* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* *-*-mingw* } } */
5 /* { dg-options "-O2 -fno-common -fdump-tree-optimized" } */
6
7 const int conststaticvariable;
8
9 int f(void)
10 {
11 return conststaticvariable;
12 }
13
14 /* There should be no reference for nonpic targets to
15 conststaticvariable as we should have inlined the 0. */
16 /* { dg-final { scan-tree-dump-times "conststaticvariable" 0 "optimized" { target { pie_enabled || nonpic } } } } */
17 /* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { target { { ! pie_enabled } && { ! nonpic } } } } } */