This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR testsuite/35538: gcc.dg/tree-ssa/ssa-store-ccp-[34].c
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Mar 2008 06:43:01 -0700
- Subject: PATCH: PR testsuite/35538: gcc.dg/tree-ssa/ssa-store-ccp-[34].c
On some targets, either PIC is the default or variable in shared
library can't be overridden at run-time. This patch adjusts those
testcases for them.
H.J.
---
2008-03-12 H.J. Lu <hongjiu.lu@intel.com>
Uros Bizjak <ubizjak@gmail.com>
PR testsuite/35538
* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Support PIC targets.
* gcc.dg/tree-ssa/ssa-store-ccp-4.c: Skip darwin.
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c.pic 2008-03-10 22:03:28.000000000 -0700
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2008-03-12 06:32:09.000000000 -0700
@@ -8,7 +8,8 @@ int f(void)
return conststaticvariable;
}
-/* There should be no reference to conststaticvariable as we should have
- inlined the 0. */
-/* { dg-final { scan-tree-dump-times "conststaticvariable" 0 "optimized"} } */
+/* There should be no reference for nonpic targets to
+ conststaticvariable as we should have inlined the 0. */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 0 "optimized" { target nonpic } } } */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { target { ! nonpic } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-4.c.pic 2008-03-10 22:03:28.000000000 -0700
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-4.c 2008-03-11 07:16:55.000000000 -0700
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
+/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
/* { dg-options "-O2 -fno-common -fpic -fdump-tree-optimized" } */
const int conststaticvariable;