On Wed, Feb 13, 2013 at 12:14 PM, Jakub Jelinek <ja...@redhat.com> wrote: > 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 <tmsri...@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.
Committed patch which does exactly this. 2013-02-13 Sriraman Tallam <tmsri...@google.com> * g++.dg/ext/mv12-aux.C: Delete, move to mv12-aux.cc. * g++.dg/ext/mv12-aux.cc: New file. * g++.dg/ext/mv12.h: Remove directives. Fix comment. * g++.dg/ext/mv12.C: Fix file name. Index: mv12-aux.cc =================================================================== --- mv12-aux.cc (revision 0) +++ mv12-aux.cc (revision 0) @@ -0,0 +1,10 @@ +// Test case to check if multiversioning works as expected when the versions +// are defined in different files. Auxiliary file for mv12.C. + +#include "mv12.h" + +__attribute__ ((target ("sse4.2"))) +int foo () +{ + return 1; +} Index: mv12.C =================================================================== --- mv12.C (revision 196025) +++ mv12.C (working copy) @@ -4,7 +4,7 @@ // { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-require-ifunc "" } // { dg-options "-O2" } -// { dg-additional-sources "mv12-aux.C" } +// { dg-additional-sources "mv12-aux.cc" } #include "mv12.h" Index: mv12.h =================================================================== --- mv12.h (revision 196025) +++ mv12.h (working copy) @@ -1,6 +1,4 @@ -// Header file used by mv12.C and mv12-aux.C. -// { dg-do compile { target i?86-*-* x86_64-*-* } } -// { dg-options "" } +// Header file used by mv12.C and mv12-aux.cc. int foo () __attribute__ ((target ("default"))); int foo () __attribute__ ((target ("sse4.2"))); Index: mv12-aux.C =================================================================== --- mv12-aux.C (revision 196025) +++ mv12-aux.C (working copy) @@ -1,14 +0,0 @@ -// 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 { target i?86-*-* x86_64-*-* } } -// { dg-require-ifunc "" } -// { dg-options "-O2" } - -#include "mv12.h" - -__attribute__ ((target ("sse4.2"))) -int foo () -{ - return 1; -} Thanks Sri > >> --- 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