On Mon, Oct 26, 2020 at 04:28:20PM +0000, Iain Sandoe wrote: > David Edelsohn via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > FAIL: gcc.target/powerpc/swaps-p8-22.c (test for excess errors) > > Excess errors: > > cc1: error: '-mcmodel' not supported in this configuration > > > > * gcc.target/powerpc/swaps-p8-22.c: Disable for -m32. > > > > diff --git a/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c > > b/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c > > index 83f6ab3a1c0..bceada41b75 100644 > > --- a/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c > > +++ b/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c > > @@ -1,5 +1,5 @@ > > /* { dg-do compile } */ > > -/* { dg-require-effective-target powerpc_p8vector_ok } */ > > +/* { dg-require-effective-target { lp64 && powerpc_p8vector_ok } } */ > > /* { dg-options "-O2 -mdejagnu-cpu=power8 -maltivec -mcmodel=large" } */ > > > > /* The expansion for vector character multiply introduces a vperm > > operation. > > > > > > Please don't fix the failure this way. This is incorrect. -m32 means > > more than Linux. This reverts my hard work to run more of the powerpc > > testsuite on AIX. AIX also is -m32.
Ah, David was the culprit that broke the test on linux and darwin. ;-) > Darwin also is (powerpc-darwin) and has an m32 multilib (powerpc64-darwin) > so not reliable there either. > > > > This probably should be fixed with > > > > { dg-additional-options "-mcmodel=large" { target { lp64 || > > !powerpc*-*-linux* } } } > > > > or whatever the appropriate incantation to omit only ppc32 linux. Or maybe > > > > { dg-do compile { target { lp64 || !powerpc*-*-linux* } } } > > mcmodel will also break for powerpc64 and powerpc / m64 Darwin, so if this is > meant to be Linux-specific, that seems to be the thing to mention. $ grep mcmodel gcc/config/rs6000/*.opt gcc/config/rs6000/aix64.opt:mcmodel= gcc/config/rs6000/aix64.opt:Known code models (for use with the -mcmodel= option): gcc/config/rs6000/linux64.opt:mcmodel= gcc/config/rs6000/linux64.opt:Known code models (for use with the -mcmodel= option): aix64.opt is used for all rs6000-aix targets, linux64.opt for 64-bit and biarch powerpc linux targets. powerpc linux errors for -mcmodel when -m32 (yes, even when biarch Segher). So the proper test is a little more complicated than any suggestion given so far. This looks correct to me, bearing in mind that the test is a duplicate of swaps-p8-21.c aimed specifically at testing -mcmodel=large. * gcc.target/powerpc/swaps-p8-22.c: Enable only for aix and -m64 linux. diff --git a/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c b/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c index 83f6ab3a1c0..847aebccca8 100644 --- a/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c +++ b/gcc/testsuite/gcc.target/powerpc/swaps-p8-22.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target { *-*-aix* || { *-*-linux* && lp64 } } } } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-options "-O2 -mdejagnu-cpu=power8 -maltivec -mcmodel=large" } */ -- Alan Modra Australia Development Lab, IBM