Support PIE in gcc.dg/tree-ssa/ssa-store-ccp-3.c
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 13 Jan 2015 20:07:33 +0000 (20:07 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 13 Jan 2015 20:07:33 +0000 (12:07 -0800)
target nonpic is always false for -fPIE since it defines both __PIC__
and __PIE__.  This patch changes gcc.dg/tree-ssa/ssa-store-ccp-3.c to
make it to pass with -fPIE by excluding PIE when nonpic is true.

* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is
true.

From-SVN: r219554

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c

index 24e8b25de59dcedd2a79df1ebde91fce5aefa05a..9fbdbcce144d272364c2c01310d2be978176b059 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is
+       true.
+
 2015-01-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * gcc.target/i386/pie.c: New test.
index e187735a4194a049b47d526e42c5c632e3c09be5..eafcd9c413415797fb8e00138a6c2ffeff0c1c3a 100644 (file)
@@ -13,6 +13,6 @@ int f(void)
 
 /* 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 { scan-tree-dump-times "conststaticvariable" 0 "optimized" { target { pie || nonpic } } } } */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { target { { ! pie } && { ! nonpic } } } } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */