public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite] Reliably prune GCC notes in C++ compat suite
@ 2014-07-17  2:25 Ulrich Weigand
  2014-07-17 16:14 ` Bernhard Reutner-Fischer
  2014-07-23 11:52 ` [PING, PATCH, " Ulrich Weigand
  0 siblings, 2 replies; 4+ messages in thread
From: Ulrich Weigand @ 2014-07-17  2:25 UTC (permalink / raw)
  To: gcc-patches

Hello,

in testing the rs6000 ABI patches I noted a weird effect: usually, the
-Wpsabi warning notes are ignored in the compat test suites, so we get
a clean test run anyway.

However, when running the C++ version of the struct-layout-1.exp case
*alone* (using RUNTESTFLAGS=struct-layout-1.exp), suddenly tests are
failing because of those extra notes.  This does *not* happen with
the C version of that suite ...

It turns out that that pruning those notes is supposed to happen
from within gcc-defs.exp:${tool}_check_compile:
    if { [info proc ${tool}-dg-prune] != "" } {
        global target_triplet
        set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
    }

However, the g++-dg-prune routine is defined in g++-dg.exp, which
is never included from g++.dg/compat/struct-layout-1.exp (directly
or indirectly).  Now, when running the full suite, that file would
have been loaded by some earlier g++.dg .exp file, so everything
works out.  But when running struct-layout-1.exp stand-alone, the
g++-dg-prune routine is never defined and thus silently no pruning
takes place.

To fix this, the following patch simply loads g++-dg.exp directly
from g++.dg/compat/struct-layout-1.exp.

Tested on powerpc64-linux and powerpc64le-linux.

OK for mainline (and 4.8/4.9 once the rs6000 ABI patches are
backported there)?

Bye,
Ulrich


gcc/testsuite/ChangeLog:

	* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp


Index: gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
===================================================================
--- gcc-4_9-branch.orig/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
 # This must be done after the compat-use-*-compiler definitions.
 load_lib compat.exp
 
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
+load_lib g++-dg.exp
+
 g++_init
 
 # Save variables for the C++ compiler under test, which each test will

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, testsuite] Reliably prune GCC notes in C++ compat suite
  2014-07-17  2:25 [PATCH, testsuite] Reliably prune GCC notes in C++ compat suite Ulrich Weigand
@ 2014-07-17 16:14 ` Bernhard Reutner-Fischer
  2014-07-23 11:52 ` [PING, PATCH, " Ulrich Weigand
  1 sibling, 0 replies; 4+ messages in thread
From: Bernhard Reutner-Fischer @ 2014-07-17 16:14 UTC (permalink / raw)
  To: Ulrich Weigand, gcc-patches; +Cc: Mike Stump

On 17 July 2014 02:51:14 "Ulrich Weigand" <uweigand@de.ibm.com> wrote:

> Hello,
>
> in testing the rs6000 ABI patches I noted a weird effect: usually, the
> -Wpsabi warning notes are ignored in the compat test suites, so we get
> a clean test run anyway.
>
> However, when running the C++ version of the struct-layout-1.exp case
> *alone* (using RUNTESTFLAGS=struct-layout-1.exp), suddenly tests are
> failing because of those extra notes.  This does *not* happen with
> the C version of that suite ...
>
> It turns out that that pruning those notes is supposed to happen
> from within gcc-defs.exp:${tool}_check_compile:
>     if { [info proc ${tool}-dg-prune] != "" } {
>         global target_triplet
>         set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
>     }
>
> However, the g++-dg-prune routine is defined in g++-dg.exp, which
> is never included from g++.dg/compat/struct-layout-1.exp (directly
> or indirectly).  Now, when running the full suite, that file would
> have been loaded by some earlier g++.dg .exp file, so everything
> works out.  But when running struct-layout-1.exp stand-alone, the
> g++-dg-prune routine is never defined and thus silently no pruning
> takes place.
>
> To fix this, the following patch simply loads g++-dg.exp directly
> from g++.dg/compat/struct-layout-1.exp.
>
> Tested on powerpc64-linux and powerpc64le-linux.
>
> OK for mainline (and 4.8/4.9 once the rs6000 ABI patches are
> backported there)?

Mike,
On a related note:
https://gcc.gnu.org/ml/fortran/2012-03/msg00094.html
The libdirs was applied to dejagnu some time ago, so once we can require 
that version (anytime now) we could apply the patch referenced above.
Also see BUG: in the URL above for another missing load_lib.

Thanks,
>
> Bye,
> Ulrich
>
>
> gcc/testsuite/ChangeLog:
>
> 	* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp
>
>
> Index: gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> ===================================================================
> --- gcc-4_9-branch.orig/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> +++ gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> @@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
>  # This must be done after the compat-use-*-compiler definitions.
>  load_lib compat.exp
>
> +# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
> +load_lib g++-dg.exp
> +
>  g++_init
>
>  # Save variables for the C++ compiler under test, which each test will
>
> --
>   Dr. Ulrich Weigand
>   GNU/Linux compilers and toolchain
>   Ulrich.Weigand@de.ibm.com
>



Sent with AquaMail for Android
http://www.aqua-mail.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PING, PATCH, testsuite] Reliably prune GCC notes in C++ compat suite
  2014-07-17  2:25 [PATCH, testsuite] Reliably prune GCC notes in C++ compat suite Ulrich Weigand
  2014-07-17 16:14 ` Bernhard Reutner-Fischer
@ 2014-07-23 11:52 ` Ulrich Weigand
  2014-07-23 22:17   ` Mike Stump
  1 sibling, 1 reply; 4+ messages in thread
From: Ulrich Weigand @ 2014-07-23 11:52 UTC (permalink / raw)
  To: gcc-patches


Ping?

> Hello,
> 
> in testing the rs6000 ABI patches I noted a weird effect: usually, the
> -Wpsabi warning notes are ignored in the compat test suites, so we get
> a clean test run anyway.
> 
> However, when running the C++ version of the struct-layout-1.exp case
> *alone* (using RUNTESTFLAGS=struct-layout-1.exp), suddenly tests are
> failing because of those extra notes.  This does *not* happen with
> the C version of that suite ...
> 
> It turns out that that pruning those notes is supposed to happen
> from within gcc-defs.exp:${tool}_check_compile:
>     if { [info proc ${tool}-dg-prune] != "" } {
>         global target_triplet
>         set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
>     }
> 
> However, the g++-dg-prune routine is defined in g++-dg.exp, which
> is never included from g++.dg/compat/struct-layout-1.exp (directly
> or indirectly).  Now, when running the full suite, that file would
> have been loaded by some earlier g++.dg .exp file, so everything
> works out.  But when running struct-layout-1.exp stand-alone, the
> g++-dg-prune routine is never defined and thus silently no pruning
> takes place.
> 
> To fix this, the following patch simply loads g++-dg.exp directly
> from g++.dg/compat/struct-layout-1.exp.
> 
> Tested on powerpc64-linux and powerpc64le-linux.
> 
> OK for mainline (and 4.8/4.9 once the rs6000 ABI patches are
> backported there)?
> 
> Bye,
> Ulrich
> 
> 
> gcc/testsuite/ChangeLog:
> 
> 	* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp
> 
> 
> Index: gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> ===================================================================
> --- gcc-4_9-branch.orig/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> +++ gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
> @@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
>  # This must be done after the compat-use-*-compiler definitions.
>  load_lib compat.exp
>  
> +# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
> +load_lib g++-dg.exp
> +
>  g++_init
>  
>  # Save variables for the C++ compiler under test, which each test will
> 
> -- 
>   Dr. Ulrich Weigand
>   GNU/Linux compilers and toolchain
>   Ulrich.Weigand@de.ibm.com
> 


-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PING, PATCH, testsuite] Reliably prune GCC notes in C++ compat suite
  2014-07-23 11:52 ` [PING, PATCH, " Ulrich Weigand
@ 2014-07-23 22:17   ` Mike Stump
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Stump @ 2014-07-23 22:17 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gcc-patches

On Jul 23, 2014, at 4:42 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> Ping?

Ok.

>> Hello,
>> 
>> in testing the rs6000 ABI patches I noted a weird effect: usually, the
>> -Wpsabi warning notes are ignored in the compat test suites, so we get
>> a clean test run anyway.
>> 
>> However, when running the C++ version of the struct-layout-1.exp case
>> *alone* (using RUNTESTFLAGS=struct-layout-1.exp), suddenly tests are
>> failing because of those extra notes.  This does *not* happen with
>> the C version of that suite ...
>> 
>> It turns out that that pruning those notes is supposed to happen
>> from within gcc-defs.exp:${tool}_check_compile:
>>    if { [info proc ${tool}-dg-prune] != "" } {
>>        global target_triplet
>>        set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
>>    }
>> 
>> However, the g++-dg-prune routine is defined in g++-dg.exp, which
>> is never included from g++.dg/compat/struct-layout-1.exp (directly
>> or indirectly).  Now, when running the full suite, that file would
>> have been loaded by some earlier g++.dg .exp file, so everything
>> works out.  But when running struct-layout-1.exp stand-alone, the
>> g++-dg-prune routine is never defined and thus silently no pruning
>> takes place.
>> 
>> To fix this, the following patch simply loads g++-dg.exp directly
>> from g++.dg/compat/struct-layout-1.exp.
>> 
>> Tested on powerpc64-linux and powerpc64le-linux.
>> 
>> OK for mainline (and 4.8/4.9 once the rs6000 ABI patches are
>> backported there)?
>> 
>> Bye,
>> Ulrich
>> 
>> 
>> gcc/testsuite/ChangeLog:
>> 
>> 	* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp
>> 
>> 
>> Index: gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
>> ===================================================================
>> --- gcc-4_9-branch.orig/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
>> +++ gcc-4_9-branch/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
>> @@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
>> # This must be done after the compat-use-*-compiler definitions.
>> load_lib compat.exp
>> 
>> +# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
>> +load_lib g++-dg.exp
>> +
>> g++_init
>> 
>> # Save variables for the C++ compiler under test, which each test will
>> 
>> -- 
>>  Dr. Ulrich Weigand
>>  GNU/Linux compilers and toolchain
>>  Ulrich.Weigand@de.ibm.com
>> 
> 
> 
> -- 
>  Dr. Ulrich Weigand
>  GNU/Linux compilers and toolchain
>  Ulrich.Weigand@de.ibm.com
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-23 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-17  2:25 [PATCH, testsuite] Reliably prune GCC notes in C++ compat suite Ulrich Weigand
2014-07-17 16:14 ` Bernhard Reutner-Fischer
2014-07-23 11:52 ` [PING, PATCH, " Ulrich Weigand
2014-07-23 22:17   ` Mike Stump

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).