* [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally"
@ 2009-10-15 15:44 Kaveh R. GHAZI
2009-10-15 17:29 ` Janis Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Kaveh R. GHAZI @ 2009-10-15 15:44 UTC (permalink / raw)
To: gcc-patches; +Cc: janis187
There's another new test that fails with -fpic/-fPIC, which is cured by
binding functions locally using -fpie. The current scheme for adding
-fpie is to do something like this:
/* { dg-options "-O3 -fdump-tree-optimized -fno-inline" } */
+/* { dg-options "-O3 -fdump-tree-optimized -fno-inline -fpie" { target { ! nonpic } } } */
I.e. you copy the dg-options line, add -fpie, and put in a pic target
check. I'm not a fan of this because it's ugly, it's fragile and it
forces future developers to add new flags in two places should the rare
need arise to change the testcase.
So I decided to try writing a dg-add-options procedure instead. In
addition to being more elegant, another advantage here is that it can do
-fpie or -fPIE depending on which kind of pic/PIC code you are using. It
hasn't seemed to matter on x86; but what the heck, other platforms might
care... Anyway I'm not sure if this patch is right, I just copied and
pasted code from the ieee add-options procedure until it worked. :-P
If this is approved, I'll create followup patches to convert the other
tests needing -fpie to use this instead.
Tested on x86_64-unknown-linux-gnu with -fpic/-fPIC/regular passes. No
regressions and the ipa-cp-1.c test is fixed. I also inspected the
gcc.log file and visually verified that the ipa-cp-1.c test gets the right
flags for each pass.
Okay for mainline?
Thanks,
--Kaveh
2009-10-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lib/target-supports.exp (add_options_for_bind_pic_locally): New.
* gcc.dg/tree-ssa/ipa-cp-1.c: Bind pic locally.
diff -rup orig/egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp
--- orig/egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp 2009-10-14 03:24:05.000000000 +0200
+++ egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp 2009-10-15 04:01:10.000000000 +0200
@@ -2984,6 +2984,28 @@ proc add_options_for_ieee { flags } {
return $flags
}
+# Add to FLAGS the flags needed to enable functions to bind locally
+# when using pic/PIC passes in the testsuite.
+
+proc add_options_for_bind_pic_locally { flags } {
+ if {[check_no_compiler_messages using_pic2 assembly {
+ #if __PIC__ != 2
+ #error FOO
+ #endif
+ }]} {
+ return "$flags -fPIE"
+ }
+ if {[check_no_compiler_messages using_pic1 assembly {
+ #if __PIC__ != 1
+ #error FOO
+ #endif
+ }]} {
+ return "$flags -fpie"
+ }
+
+ return $flags
+}
+
# Return 1 if the target provides a full C99 runtime.
proc check_effective_target_c99_runtime { } {
diff -rup orig/egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c
--- orig/egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c 2009-10-04 02:00:21.000000000 +0200
+++ egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c 2009-10-15 03:53:19.000000000 +0200
@@ -1,5 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized -fno-inline" } */
+/* { dg-add-options bind_pic_locally } */
+
int
very_long_function(int a)
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally"
2009-10-15 15:44 [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally" Kaveh R. GHAZI
@ 2009-10-15 17:29 ` Janis Johnson
2009-10-16 15:55 ` Kaveh R. GHAZI
0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2009-10-15 17:29 UTC (permalink / raw)
To: Kaveh R. GHAZI; +Cc: gcc-patches
On Thu, 2009-10-15 at 11:41 -0400, Kaveh R. GHAZI wrote:
> There's another new test that fails with -fpic/-fPIC, which is cured by
> binding functions locally using -fpie. The current scheme for adding
> -fpie is to do something like this:
>
> /* { dg-options "-O3 -fdump-tree-optimized -fno-inline" } */
> +/* { dg-options "-O3 -fdump-tree-optimized -fno-inline -fpie" { target { ! nonpic } } } */
>
> I.e. you copy the dg-options line, add -fpie, and put in a pic target
> check. I'm not a fan of this because it's ugly, it's fragile and it
> forces future developers to add new flags in two places should the rare
> need arise to change the testcase.
>
> So I decided to try writing a dg-add-options procedure instead. In
> addition to being more elegant, another advantage here is that it can do
> -fpie or -fPIE depending on which kind of pic/PIC code you are using. It
> hasn't seemed to matter on x86; but what the heck, other platforms might
> care... Anyway I'm not sure if this patch is right, I just copied and
> pasted code from the ieee add-options procedure until it worked. :-P
> If this is approved, I'll create followup patches to convert the other
> tests needing -fpie to use this instead.
>
> Tested on x86_64-unknown-linux-gnu with -fpic/-fPIC/regular passes. No
> regressions and the ipa-cp-1.c test is fixed. I also inspected the
> gcc.log file and visually verified that the ipa-cp-1.c test gets the right
> flags for each pass.
>
> Okay for mainline?
>
OK.
Janis
> 2009-10-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> * lib/target-supports.exp (add_options_for_bind_pic_locally): New.
> * gcc.dg/tree-ssa/ipa-cp-1.c: Bind pic locally.
>
> diff -rup orig/egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp
> --- orig/egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp 2009-10-14 03:24:05.000000000 +0200
> +++ egcc-SVN20091014/gcc/testsuite/lib/target-supports.exp 2009-10-15 04:01:10.000000000 +0200
> @@ -2984,6 +2984,28 @@ proc add_options_for_ieee { flags } {
> return $flags
> }
>
> +# Add to FLAGS the flags needed to enable functions to bind locally
> +# when using pic/PIC passes in the testsuite.
> +
> +proc add_options_for_bind_pic_locally { flags } {
> + if {[check_no_compiler_messages using_pic2 assembly {
> + #if __PIC__ != 2
> + #error FOO
> + #endif
> + }]} {
> + return "$flags -fPIE"
> + }
> + if {[check_no_compiler_messages using_pic1 assembly {
> + #if __PIC__ != 1
> + #error FOO
> + #endif
> + }]} {
> + return "$flags -fpie"
> + }
> +
> + return $flags
> +}
> +
> # Return 1 if the target provides a full C99 runtime.
>
> proc check_effective_target_c99_runtime { } {
> diff -rup orig/egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c
> --- orig/egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c 2009-10-04 02:00:21.000000000 +0200
> +++ egcc-SVN20091014/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c 2009-10-15 03:53:19.000000000 +0200
> @@ -1,5 +1,7 @@
> /* { dg-do compile } */
> /* { dg-options "-O3 -fdump-tree-optimized -fno-inline" } */
> +/* { dg-add-options bind_pic_locally } */
> +
> int
> very_long_function(int a)
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally"
2009-10-15 17:29 ` Janis Johnson
@ 2009-10-16 15:55 ` Kaveh R. GHAZI
2009-10-16 16:52 ` Janis Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Kaveh R. GHAZI @ 2009-10-16 15:55 UTC (permalink / raw)
To: Janis Johnson; +Cc: gcc-patches
On Thu, 15 Oct 2009, Janis Johnson wrote:
> OK.
>
> Janis
>
> > 2009-10-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
> >
> > * lib/target-supports.exp (add_options_for_bind_pic_locally): New.
> > * gcc.dg/tree-ssa/ipa-cp-1.c: Bind pic locally.
Thanks Janis. Here's the patch to retrofit existing tests with the new
dg-add-options command. I also found a few that were doing dg-skip for
-fpic/-fPIC instead of adding -fpie and fixed those as well.
Tested on x86_64-unknown-linux-gnu with -fpic/-fPIC/regular passes, no
regressions. I also visually inspected the .log files and ensured that
-fpie/-fPIE was passed to the appropriate tests.
Okay for mainline?
Thanks,
--Kaveh
2009-10-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.dg/ipa/iinline-1.C: Use dg-add-options bind_pic_locally.
* g++.dg/other/first-global.C: Likewise.
* g++.dg/parse/attr-externally-visible-1.C: Likewise.
* g++.dg/torture/pr40323.C: Likewise.
* g++.dg/tree-ssa/nothrow-1.C: Likewise.
* gcc.dg/inline-33.c: Likewise.
* gcc.dg/ipa/ipa-1.c: Likewise.
* gcc.dg/ipa/ipa-2.c: Likewise.
* gcc.dg/ipa/ipa-3.c: Likewise.
* gcc.dg/ipa/ipa-4.c: Likewise.
* gcc.dg/ipa/ipa-5.c: Likewise.
* gcc.dg/ipa/ipa-7.c: Likewise.
* gcc.dg/ipa/ipacost-2.c: Likewise.
* gcc.dg/tree-ssa/inline-3.c: Likewise.
* gcc.dg/tree-ssa/local-pure-const.c: Likewise.
* gfortran.dg/whole_file_5.f90: Likewise.
* gfortran.dg/whole_file_6.f90: Likewise.
diff -rup orig/egcc-SVN20091015/gcc/testsuite/g++.dg/ipa/iinline-1.C egcc-SVN20091015/gcc/testsuite/g++.dg/ipa/iinline-1.C
--- orig/egcc-SVN20091015/gcc/testsuite/g++.dg/ipa/iinline-1.C 2009-09-04 02:00:48.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/g++.dg/ipa/iinline-1.C 2009-10-15 20:20:38.000000000 +0200
@@ -2,7 +2,7 @@
inlining.. */
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
-/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
extern void non_existent (const char *, int);
diff -rup orig/egcc-SVN20091015/gcc/testsuite/g++.dg/other/first-global.C egcc-SVN20091015/gcc/testsuite/g++.dg/other/first-global.C
--- orig/egcc-SVN20091015/gcc/testsuite/g++.dg/other/first-global.C 2008-03-14 00:38:17.000000000 +0100
+++ egcc-SVN20091015/gcc/testsuite/g++.dg/other/first-global.C 2009-10-15 20:22:25.000000000 +0200
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
/* { dg-final { scan-assembler "_GLOBAL__I(_|_65535_0_)foobar" } } */
struct foo { foo (); };
diff -rup orig/egcc-SVN20091015/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C egcc-SVN20091015/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C
--- orig/egcc-SVN20091015/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C 2008-03-14 00:38:15.000000000 +0100
+++ egcc-SVN20091015/gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C 2009-10-15 20:21:41.000000000 +0200
@@ -1,6 +1,6 @@
// { dg-do compile }
// { dg-options "-O3 -fwhole-program" }
-// { dg-options "-O3 -fwhole-program -fpie" { target { ! nonpic } } }
+// { dg-add-options bind_pic_locally }
// { dg-final { scan-assembler "foo1" } }
// { dg-final { scan-assembler "foo2" } }
// { dg-final { scan-assembler "foo3" } }
diff -rup orig/egcc-SVN20091015/gcc/testsuite/g++.dg/torture/pr40323.C egcc-SVN20091015/gcc/testsuite/g++.dg/torture/pr40323.C
--- orig/egcc-SVN20091015/gcc/testsuite/g++.dg/torture/pr40323.C 2009-06-04 02:00:48.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/g++.dg/torture/pr40323.C 2009-10-15 20:19:42.000000000 +0200
@@ -1,7 +1,7 @@
/* Testcase for PR 40323. */
/* { dg-do compile } */
/* { dg-options "-fno-early-inlining" } */
-/* { dg-options "-fno-early-inlining -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
extern void do_something (const char *, int);
diff -rup orig/egcc-SVN20091015/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C egcc-SVN20091015/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
--- orig/egcc-SVN20091015/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C 2008-03-14 00:38:14.000000000 +0100
+++ egcc-SVN20091015/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C 2009-10-15 20:38:50.000000000 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-cfg" } */
-/* { dg-skip-if "" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
+
double a;
void t()
{
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/inline-33.c egcc-SVN20091015/gcc/testsuite/gcc.dg/inline-33.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/inline-33.c 2009-03-26 07:14:11.000000000 +0100
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/inline-33.c 2009-10-15 20:25:06.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized" } */
-/* { dg-options "-O3 -fdump-tree-optimized -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
int i;
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-1.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-1.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-1.c 2008-08-30 02:00:12.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-1.c 2009-10-15 20:33:44.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
#include <stdio.h>
int g (int b, int c)
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-2.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-2.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-2.c 2008-08-30 02:00:12.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-2.c 2009-10-15 20:33:58.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
#include <stdio.h>
int g (int b, int c)
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-3.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-3.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-3.c 2009-03-30 02:00:46.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-3.c 2009-10-15 20:34:06.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
/* Double constants. */
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-4.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-4.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-4.c 2009-05-16 02:01:01.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-4.c 2009-10-15 20:34:22.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
#include <stdio.h>
int g (int b, int c)
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-5.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-5.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-5.c 2009-03-30 02:00:46.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-5.c 2009-10-15 20:34:32.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
/* Float & short constants. */
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-7.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-7.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-7.c 2008-08-30 02:00:12.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipa-7.c 2009-10-15 20:35:06.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
-/* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+/* { dg-add-options bind_pic_locally } */
#include <stdio.h>
void send_addr (int *);
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipacost-2.c egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipacost-2.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipacost-2.c 2009-05-13 02:00:57.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/ipa/ipacost-2.c 2009-10-15 20:23:35.000000000 +0200
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized" } */
-/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
int array[100];
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c 2009-09-02 20:08:49.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c 2009-10-15 20:24:40.000000000 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
-/* { dg-options "-O2 -fdump-tree-einline2 -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
+
extern void inlined ();
void inline_me_too (void);
void inline_through_me (void (*ptr)(void));
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c
--- orig/egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c 2009-09-02 20:08:49.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c 2009-10-15 20:24:14.000000000 +0200
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
-/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fpie" { target { ! nonpic } } } */
+/* { dg-add-options bind_pic_locally } */
+
t(int a, int b, int c)
{
int *p;
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_5.f90 egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_5.f90
--- orig/egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_5.f90 2009-08-30 02:00:37.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_5.f90 2009-10-15 20:25:30.000000000 +0200
@@ -1,6 +1,6 @@
! { dg-do "compile" }
! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" }
-! { dg-options "-O3 -fwhole-file -fdump-tree-optimized -fpie" { target { ! nonpic } } }
+! { dg-add-options bind_pic_locally }
!
! Check that inlining of functions declared BEFORE usage works.
! If yes, then the dump does not contain a call to F().
diff -rup orig/egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_6.f90 egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_6.f90
--- orig/egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_6.f90 2009-08-30 02:00:37.000000000 +0200
+++ egcc-SVN20091015/gcc/testsuite/gfortran.dg/whole_file_6.f90 2009-10-15 20:25:55.000000000 +0200
@@ -1,6 +1,6 @@
! { dg-do "compile" }
! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" }
-! { dg-options "-O3 -fwhole-file -fdump-tree-optimized -fpie" { target { ! nonpic } } }
+! { dg-add-options bind_pic_locally }
!
! Check that inlining of functions declared AFTER usage works.
! If yes, then the dump does not contain a call to F().
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally"
2009-10-16 15:55 ` Kaveh R. GHAZI
@ 2009-10-16 16:52 ` Janis Johnson
0 siblings, 0 replies; 4+ messages in thread
From: Janis Johnson @ 2009-10-16 16:52 UTC (permalink / raw)
To: Kaveh R. GHAZI; +Cc: gcc-patches
On Fri, 2009-10-16 at 11:53 -0400, Kaveh R. GHAZI wrote:
> On Thu, 15 Oct 2009, Janis Johnson wrote:
>
> > OK.
> >
> > Janis
> >
> > > 2009-10-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
> > >
> > > * lib/target-supports.exp (add_options_for_bind_pic_locally): New.
> > > * gcc.dg/tree-ssa/ipa-cp-1.c: Bind pic locally.
>
> Thanks Janis. Here's the patch to retrofit existing tests with the new
> dg-add-options command. I also found a few that were doing dg-skip for
> -fpic/-fPIC instead of adding -fpie and fixed those as well.
>
> Tested on x86_64-unknown-linux-gnu with -fpic/-fPIC/regular passes, no
> regressions. I also visually inspected the .log files and ensured that
> -fpie/-fPIE was passed to the appropriate tests.
>
> Okay for mainline?
OK.
Janis
>
> 2009-10-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>
> * g++.dg/ipa/iinline-1.C: Use dg-add-options bind_pic_locally.
> * g++.dg/other/first-global.C: Likewise.
> * g++.dg/parse/attr-externally-visible-1.C: Likewise.
> * g++.dg/torture/pr40323.C: Likewise.
> * g++.dg/tree-ssa/nothrow-1.C: Likewise.
> * gcc.dg/inline-33.c: Likewise.
> * gcc.dg/ipa/ipa-1.c: Likewise.
> * gcc.dg/ipa/ipa-2.c: Likewise.
> * gcc.dg/ipa/ipa-3.c: Likewise.
> * gcc.dg/ipa/ipa-4.c: Likewise.
> * gcc.dg/ipa/ipa-5.c: Likewise.
> * gcc.dg/ipa/ipa-7.c: Likewise.
> * gcc.dg/ipa/ipacost-2.c: Likewise.
> * gcc.dg/tree-ssa/inline-3.c: Likewise.
> * gcc.dg/tree-ssa/local-pure-const.c: Likewise.
> * gfortran.dg/whole_file_5.f90: Likewise.
> * gfortran.dg/whole_file_6.f90: Likewise.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-16 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-15 15:44 [PATCH TESTSUITE]: Fix ipa-cp-1 when -fpic by creating new dg-add-options "bind-pic-locally" Kaveh R. GHAZI
2009-10-15 17:29 ` Janis Johnson
2009-10-16 15:55 ` Kaveh R. GHAZI
2009-10-16 16:52 ` Janis Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).