This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 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 09:12:39 -0700
- Subject: Re: PATCH: PR testsuite/35538: gcc.dg/tree-ssa/ssa-store-ccp-[34].c
- References: <20080312134300.GA12313@lucon.org>
On Wed, Mar 12, 2008 at 6:43 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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" } } */
This one doesn't work on darwin. I can't get it to work with both
darwin and Linux/PIC.
This updated patch will just skip gcc.dg/tree-ssa/ssa-store-ccp-3.c on darwin.
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 and
skip darwin.
* 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 11:23:27.000000000 -0700
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c 2008-03-12 09:07:53.000000000 -0700
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
/* { dg-options "-O2 -fno-common -fdump-tree-optimized" } */
const int conststaticvariable;
@@ -8,7 +9,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 11:23:27.000000000 -0700
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-4.c 2008-03-12 09:07:39.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;