Patchwork Multiversioning fixes (PR c++/55742, take 2)

login
register
mail settings
Submitter Sriraman Tallam
Date Feb. 13, 2013, 6:57 p.m.
Message ID <CAAs8Hmy_jzCqYeOa1rm3iR18PkhryhnV3ijN9DdnaN-ZOizgGg@mail.gmail.com>
Download mbox | patch
Permalink /patch/220229/
State New
Headers show

Comments

Sriraman Tallam - Feb. 13, 2013, 6:57 p.m.
On Wed, Feb 13, 2013 at 7:46 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>
> On Feb 13, 2013 1:21 AM, "Andreas Schwab" <schwab@suse.de> wrote:
>>
>> Sriraman Tallam <tmsriram@google.com> writes:
>>
>> > Index: gcc/testsuite/g++.dg/ext/mv12-aux.C
>> > ===================================================================
>> > --- gcc/testsuite/g++.dg/ext/mv12-aux.C       (revision 0)
>> > +++ gcc/testsuite/g++.dg/ext/mv12-aux.C       (revision 0)
>> > @@ -0,0 +1,11 @@
>> > +// Test case to check if multiversioning works as expected when the
>> > versions
>> > +// are defined in different files. Auxiliary file for mv12.C.
>> > +// { dg-do compile }
>> > +
>> > +#include "mv12.h"
>> > +
>> > +__attribute__ ((target ("sse4.2")))
>> > +int foo ()
>>
>> FAIL: g++.dg/ext/mv12-aux.C -std=c++11 (test for excess errors)
>> Excess errors:
>> /daten/aranym/gcc/gcc-20130213/gcc/testsuite/g++.dg/ext/mv12.h:5:47:
>> warning: target attribute is not supported on this machine [-Wattributes]
>> /daten/aranym/gcc/gcc-20130213/gcc/testsuite/g++.dg/ext/mv12.h:6:46:
>> warning: target attribute is not supported on this machine [-Wattributes]
>> /daten/aranym/gcc/gcc-20130213/gcc/testsuite/g++.dg/ext/mv12-aux.C:8:10:
>> warning: target attribute is not supported on this machine [-Wattributes]
>
> I will fix this asap. Sorry about this.

I committed a trivial patch to fix this problem. mv12-aux.C is
auxiliary to mv12.C and should have the same test directives as
mv12.C.

2013-02-13  Sriraman Tallam  <tmsriram@google.com>

        * g++.dg/ext/mv12-aux.C: Add directives to match mv12.C.



Thanks
Sri


>
> Sri
>
>>
>> Andreas.
>>
>> --
>> Andreas Schwab, SUSE Labs, schwab@suse.de
>> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
>> "And now for something completely different."
Jakub Jelinek - Feb. 13, 2013, 8:14 p.m.
On Wed, Feb 13, 2013 at 10:57:42AM -0800, Sriraman Tallam wrote:
> I committed a trivial patch to fix this problem. mv12-aux.C is
> auxiliary to mv12.C and should have the same test directives as
> mv12.C.
> 
> 2013-02-13  Sriraman Tallam  <tmsriram@google.com>
> 
>         * g++.dg/ext/mv12-aux.C: Add directives to match mv12.C.

Better would be to rename
g++.dg/ext/mv12-aux.C to g++.dg/ext/mv12-aux.cc and remove all dg-*
directives from it, plus adjust dg-additional-sources in mv12.C.
The dg.exp driver is only looking for *.C testcases, so it will skip
*.cc, which is what you want.

> --- g++.dg/ext/mv12-aux.C (revision 196025)
> +++ g++.dg/ext/mv12-aux.C (working copy)
> @@ -1,7 +1,10 @@
>  // Test case to check if multiversioning works as expected when the versions
>  // are defined in different files. Auxiliary file for mv12.C.
> -// { dg-do compile }
> 
> +// { dg-do compile { target i?86-*-* x86_64-*-* } }
> +// { dg-require-ifunc "" }
> +// { dg-options "-O2" }
> +
>  #include "mv12.h"
> 
> This should fix the problem.

	Jakub

Patch

Index: g++.dg/ext/mv12-aux.C
===================================================================
--- g++.dg/ext/mv12-aux.C (revision 196025)
+++ g++.dg/ext/mv12-aux.C (working copy)
@@ -1,7 +1,10 @@ 
 // Test case to check if multiversioning works as expected when the versions
 // are defined in different files. Auxiliary file for mv12.C.
-// { dg-do compile }

+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-ifunc "" }
+// { dg-options "-O2" }
+
 #include "mv12.h"

This should fix the problem.