diff mbox

[testsuite] Adding missing dg-require-profiling directives

Message ID 87sjl0efsa.fsf@firetop.home
State New
Headers show

Commit Message

Richard Sandiford Dec. 4, 2011, 11:29 a.m. UTC
Several profiling tests fail for MIPS16.  The problem is that MIPS has
native TLS support, but the ABI has not "yet" been extended to MIPS16.
MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't
use emultls, and must simply say sorry().

This patch adds dg-require-profiling to the affected tests.  The reason
I haven't just applied it as obvious is that dg-require-profiling really
seems to be a test for link-time and runtime support.  There are presumably
targets that can't link profiling code but that are nevertheless happily
compiling the tests below.  So do we want to split the directive into two?
I ask the question while hoping the answer is "no". :-)

Tested on mips64-linux-gnu.  The tests still run for normal MIPS,
but are skipped for MIPS16.

Richard


gcc/testsuite/
	* g++.dg/debug/pr46338.C: Add dg-require-profiling.
	* g++.dg/torture/pr39732.C: Likewise.
	* g++.dg/torture/pr40642.C: Likewise.
	* gcc.c-torture/compile/pr44686.c: Likewise.
	* gcc.dg/20050309-1.c: Likewise.
	* gcc.dg/20050330-2.c: Likewise.
	* gcc.dg/20051201-1.c: Likewise.
	* gcc.dg/gomp/pr27573.c: Likewise.
	* gcc.dg/pr46255.c: Likewise.
	* gcc.dg/profile-dir-1.c: Likewise.
	* gcc.dg/profile-dir-2.c: Likewise.
	* gcc.dg/profile-dir-3.c: Likewise.
	* gcc.dg/profile-generate-1.c: Likewise.
	* gfortran.dg/gomp/pr27573.f90: Likewise.
	* gcc.dg/profile-generate-3.c: Be specific about the type of
	profiling required.

Comments

Mike Stump Dec. 4, 2011, 4:39 p.m. UTC | #1
On Dec 4, 2011, at 3:29 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> The problem is that MIPS has
> native TLS support, but the ABI has not "yet" been extended to MIPS16.
> MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't
> use emultls, and must simply say sorry().
> 
> This patch adds dg-require-profiling to the affected tests.  The reason
> I haven't just applied it as obvious is that dg-require-profiling really
> seems to be a test for link-time and runtime support.  There are presumably
> targets that can't link profiling code but that are nevertheless happily
> compiling the tests below.  So do we want to split the directive into two?
> I ask the question while hoping the answer is "no". :-)

Hum...  I'd rather TLS support be defined and added for MIPS16...  I think we have enough targets with profiling and TLS that coverage won't be lost with your change.  I like simple.  If someone feels strongly about splitting, I'll pre-approve their change.  I think your patch is fine.  Ok.
Chung-Lin Tang Dec. 5, 2011, 4:09 a.m. UTC | #2
On 2011/12/5 12:39 AM, Mike Stump wrote:
> On Dec 4, 2011, at 3:29 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>> The problem is that MIPS has
>> native TLS support, but the ABI has not "yet" been extended to MIPS16.
>> MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't
>> use emultls, and must simply say sorry().
>>
>> This patch adds dg-require-profiling to the affected tests.  The reason
>> I haven't just applied it as obvious is that dg-require-profiling really
>> seems to be a test for link-time and runtime support.  There are presumably
>> targets that can't link profiling code but that are nevertheless happily
>> compiling the tests below.  So do we want to split the directive into two?
>> I ask the question while hoping the answer is "no". :-)
> 
> Hum...  I'd rather TLS support be defined and added for MIPS16...  I think we have enough targets with profiling and TLS that coverage won't be lost with your change.  I like simple.  If someone feels strongly about splitting, I'll pre-approve their change.  I think your patch is fine.  Ok.

We already have a MIPS16 TLS implementation internally, I'll get it
ready to post here soon, though I'm afraid it's a next-stage1 kind of
modification (unless Richard has the rights to approve it at this stage?).

Thanks,
Chung-Lin
Richard Sandiford Dec. 5, 2011, 7:30 p.m. UTC | #3
Chung-Lin Tang <cltang@codesourcery.com> writes:
> On 2011/12/5 12:39 AM, Mike Stump wrote:
>> On Dec 4, 2011, at 3:29 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>>> The problem is that MIPS has
>>> native TLS support, but the ABI has not "yet" been extended to MIPS16.
>>> MIPS16 is supposed to be link-compatible with non-MIPS16, so we can't
>>> use emultls, and must simply say sorry().
>>>
>>> This patch adds dg-require-profiling to the affected tests.  The reason
>>> I haven't just applied it as obvious is that dg-require-profiling really
>>> seems to be a test for link-time and runtime support.  There are presumably
>>> targets that can't link profiling code but that are nevertheless happily
>>> compiling the tests below.  So do we want to split the directive into two?
>>> I ask the question while hoping the answer is "no". :-)
>> 
>> Hum...  I'd rather TLS support be defined and added for MIPS16...  I think we have enough targets with profiling and TLS that coverage won't be lost with your change.  I like simple.  If someone feels strongly about splitting, I'll pre-approve their change.  I think your patch is fine.  Ok.
>
> We already have a MIPS16 TLS implementation internally,

Ah, great!

> I'll get it ready to post here soon, though I'm afraid it's a
> next-stage1 kind of modification (unless Richard has the rights to
> approve it at this stage?).

It's probably getting a bit too close for 4.7, but I'd still be
interested to see the patch.  Even if it does turn out to be 4.8
material, an early review cycle would at least mean that it can
go in soon after 4.7 branches.

I expect there'll be some binutils patches too?  They'd certainly
be good to post now.  We've just branched, and if the patches are
simple enough, they might even be suitable for 2.22.1.

Richard
diff mbox

Patch

Index: gcc/testsuite/g++.dg/debug/pr46338.C
===================================================================
--- gcc/testsuite/g++.dg/debug/pr46338.C	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/g++.dg/debug/pr46338.C	2011-12-04 11:24:50.000000000 +0000
@@ -1,5 +1,6 @@ 
 // PR debug/46338
 // { dg-do compile }
+// { dg-require-profiling "-fprofile-generate" }
 // { dg-options "-O -fprofile-generate -fcompare-debug" }
 
 void bar ();
Index: gcc/testsuite/g++.dg/torture/pr39732.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr39732.C	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/g++.dg/torture/pr39732.C	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-fprofile-generate" } */
 
 template<class _CharT>     struct char_traits;
Index: gcc/testsuite/g++.dg/torture/pr40642.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr40642.C	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/g++.dg/torture/pr40642.C	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+/* { dg-require-profiling "-fprofile-generate" } */
 // { dg-options "-fprofile-generate" }
 
 // GCC used to ICE with some EH edge missing.
Index: gcc/testsuite/gcc.c-torture/compile/pr44686.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr44686.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.c-torture/compile/pr44686.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,3 +1,4 @@ 
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-fipa-pta -fprofile-generate" } */
 void *
 memcpy (void *a, const void *b, __SIZE_TYPE__ len)
Index: gcc/testsuite/gcc.dg/20050309-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20050309-1.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/20050309-1.c	2011-12-04 11:24:50.000000000 +0000
@@ -2,6 +2,7 @@ 
    output reloads.  */
 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O2 -fprofile-generate" } */
 
 char *
Index: gcc/testsuite/gcc.dg/20050330-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20050330-2.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/20050330-2.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O2 -fprofile-generate" } */
 
 struct S
Index: gcc/testsuite/gcc.dg/20051201-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20051201-1.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/20051201-1.c	2011-12-04 11:24:50.000000000 +0000
@@ -2,6 +2,7 @@ 
    tree_flow_call_edges_add.  */
 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O1 -fprofile-generate -Wno-attributes" } */
 
 static __attribute__ ((always_inline)) void 
Index: gcc/testsuite/gcc.dg/gomp/pr27573.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/pr27573.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/gomp/pr27573.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,5 +1,6 @@ 
 /* PR middle-end/27573 */
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O2 -fopenmp -fprofile-generate" } */
 
 extern int puts (const char *);
Index: gcc/testsuite/gcc.dg/pr46255.c
===================================================================
--- gcc/testsuite/gcc.dg/pr46255.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/pr46255.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,5 +1,6 @@ 
 /* PR debug/46255 */
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-fcompare-debug -fprofile-generate -O" } */
 
 int bar (void);
Index: gcc/testsuite/gcc.dg/profile-dir-1.c
===================================================================
--- gcc/testsuite/gcc.dg/profile-dir-1.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/profile-dir-1.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O -fprofile-generate=. -fdump-ipa-cgraph" } */
 /* { dg-final { scan-ipa-dump " ./profile-dir-1.gcda" "cgraph" } } */
 
Index: gcc/testsuite/gcc.dg/profile-dir-2.c
===================================================================
--- gcc/testsuite/gcc.dg/profile-dir-2.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/profile-dir-2.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O -fprofile-generate -fdump-ipa-cgraph" } */
 /* { dg-final { scan-ipa-dump "/profile-dir-2.gcda" "cgraph" } } */
 
Index: gcc/testsuite/gcc.dg/profile-dir-3.c
===================================================================
--- gcc/testsuite/gcc.dg/profile-dir-3.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/profile-dir-3.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-ipa-cgraph" } */
 /* { dg-final { scan-ipa-dump " ./profile-dir-3.gcda" "cgraph" } } */
 
Index: gcc/testsuite/gcc.dg/profile-generate-1.c
===================================================================
--- gcc/testsuite/gcc.dg/profile-generate-1.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/profile-generate-1.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,4 +1,5 @@ 
 /* Bug 16325.  */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-O -fprofile-generate" } */
 
 extern void abort (void);
Index: gcc/testsuite/gfortran.dg/gomp/pr27573.f90
===================================================================
--- gcc/testsuite/gfortran.dg/gomp/pr27573.f90	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gfortran.dg/gomp/pr27573.f90	2011-12-04 11:24:50.000000000 +0000
@@ -1,5 +1,6 @@ 
 ! PR middle-end/27573
 ! { dg-do compile }
+! { dg-require-profiling "-fprofile-generate" }
 ! { dg-options "-O2 -fopenmp -fprofile-generate" }
 
 program pr27573
Index: gcc/testsuite/gcc.dg/profile-generate-3.c
===================================================================
--- gcc/testsuite/gcc.dg/profile-generate-3.c	2011-12-04 08:52:27.000000000 +0000
+++ gcc/testsuite/gcc.dg/profile-generate-3.c	2011-12-04 11:24:50.000000000 +0000
@@ -1,5 +1,5 @@ 
 /* { dg-do link } */
-/* { dg-require-profiling "" } */
+/* { dg-require-profiling "-fprofile-generate" } */
 /* { dg-options "-fprofile-generate=." } */
 
 int