diff mbox

[testsuite] PATCH: Support PIE in gcc.dg/tree-ssa/ssa-store-ccp-3.c

Message ID 20150112002518.GA6051@gmail.com
State New
Headers show

Commit Message

H.J. Lu Jan. 12, 2015, 12:25 a.m. UTC
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.  OK to for trunk?

Thanks.

H.J.
---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

2015-01-11  H.J. Lu  <hongjiu.lu@intel.com>

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

Comments

Jeff Law Jan. 12, 2015, 6:27 p.m. UTC | #1
On 01/11/15 17:25, H.J. Lu wrote:
> 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.  OK to for trunk?
>
> Thanks.
>
> H.J.
> ---
>   gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> 2015-01-11  H.J. Lu  <hongjiu.lu@intel.com>
>
> 	* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is
> 	true.
OK if/when prerequisites go in.

jeff
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
index e187735..eafcd9c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
@@ -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" } } */