[PATCH 3/3] testsuite: Use -Wno-psabi instead of pruning compiler messages

Jakub Jelinek jakub@redhat.com
Thu Oct 6 21:09:00 GMT 2016


On Thu, Oct 06, 2016 at 07:57:37PM +0000, Segher Boessenkool wrote:
> It is much nicer to avoid a warning than to manually prune it from the
> compiler output.  This patch adds -Wno-psabi to various testcases, and
> removes dg-prune-output, for the testcases where x86 and/or PowerPC had
> those (or did warn, so the testcase failed).
> 
> Tested on powerpc64-linux {-m32,-m64}, and on x86_64-linux.  Should I
> test something else as well, maybe some options for x86 (which?)

If you could test on x86_64 with -m32/-mno-sse, it would help, but if you
don't do that, I'll check it after it is checked in in my i686-linux
bootstraps.

> --- a/gcc/testsuite/c-c++-common/scal-to-vec2.c
> +++ b/gcc/testsuite/c-c++-common/scal-to-vec2.c
> @@ -1,9 +1,7 @@
>  /* { dg-do compile } */   
>  /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
> -/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */

Why are you removing these lines (note, some tests still have them)?
I'd think it would be just enough to add the dg-additional-options.
For i386 it also adds -msse2, so that even the default is CPU without
vector ISAs, it still tests those.

>  /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
> -/* Ignore warning on some powerpc-ibm-aix configurations. */
> -/* { dg-prune-output "non-standard ABI extension" } */
> +/* { dg-additional-options "-Wno-psabi" } */
>  
>  /* Test for C_MAYBE_CONST are folded correctly when 
>     expanding an expression to vector.  */

Otherwise LGTM, but I'd say it is not all that we want to do.
It would be nice to grep also for all tests that have both -Wpsabi and -w
in dg-options or dg-additional-options, and try to remove the -w
which got usually added because of these rs6000 warnings.

	Jakub



More information about the Gcc-patches mailing list