OSDN Git Service

gcc/testsuite/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-store-ccp-3.c
1 /* { dg-do compile } */
2 /* Skipped on MIPS GNU/Linux and IRIX target because __PIC__ can be
3    defined for executables as well as shared libraries.  */
4 /* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* mips*-*-irix* } { "*" } { "" } } */
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 nonpic } } } */
17 /* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { target { ! nonpic } } } } */
18 /* { dg-final { cleanup-tree-dump "optimized" } } */