diff mbox

Fix new split-1.c testcase

Message ID CAKOQZ8wrdS19sN0nHs5u-_G8U1fhpeL3LRg_15hjCUUZw7zU7A@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor June 12, 2017, 4:16 p.m. UTC
On Mon, Jun 12, 2017 at 3:38 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Sun, Jun 11, 2017 at 07:38:04PM -0700, Ian Lance Taylor wrote:
>> On Sun, Jun 11, 2017 at 4:40 AM, Segher Boessenkool
>> <segher@kernel.crashing.org> wrote:
>> >
>> > The new split-1.c testcase fails on targets that do not support split
>> > stack (like 32-bit PowerPC Linux).  This patch fixes it by only running
>> > the testcase if split stack is supported.  It also adds the reorder
>> > flag to the options, so that the test actually tests what it says it
>> > tests.
>> >
>> > Is this okay for trunk?
>>
>> Whoops, sorry about that.
>>
>> Adding dg-require-effective-target split_stack is fine.  Adding an
>> explicit -freorder-blocks-and-partition option is not.  Adding the
>> explicit option will cause the test to fail when using gold, as the
>> two options are not compatible.  The point of the test is to test that
>> using -fsplit-stack disables the default enabling of
>> -freorder-blocks-and-partition.
>
> Ah, I see.  Could you change the comment then, to say what we are
> really testing?

Sure.  Updated as follows.  Committed to mainline.

Ian

2017-06-12  Ian Lance Taylor  <iant@golang.org>

* gcc.dg/tree-prof/split-1.c: Require split_stack, don't require
freorder.  Update comment to explain test.

Comments

Segher Boessenkool June 12, 2017, 5:58 p.m. UTC | #1
On Mon, Jun 12, 2017 at 09:16:32AM -0700, Ian Lance Taylor wrote:
> On Mon, Jun 12, 2017 at 3:38 AM, Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> > Ah, I see.  Could you change the comment then, to say what we are
> > really testing?
> 
> Sure.  Updated as follows.  Committed to mainline.

Thanks!


Segher
diff mbox

Patch

Index: gcc.dg/tree-prof/split-1.c
===================================================================
--- gcc.dg/tree-prof/split-1.c	(revision 249128)
+++ gcc.dg/tree-prof/split-1.c	(working copy)
@@ -1,6 +1,6 @@ 
-/* Test case that we don't get a link-time error when using
-   -fsplit-stack with -freorder-blocks-and-partition.  */
-/* { dg-require-effective-target freorder } */
+/* Test that we don't get a link-time error when using -fsplit-stack
+   due to implicit enabling of -freorder-blocks-and-partition.  */
+/* { dg-require-effective-target split_stack } */
 /* { dg-options "-O2 -fsplit-stack" } */
 
 extern unsigned int sleep (unsigned int);