On Thu, Nov 28, 2024 at 11:20:31AM +0000, Jennifer Schmitz wrote: > The test gcc.dg/tree-ssa/pow_fold_1.c was failing for 32-bit x86 due to > incompatibility of '-fexcess-precision=16' with '-mfpmath=387'. > In order to resolve this, this patch adds -msse -mfpmath=sse+387 for i?86-*-*. > > We tested this by running the test on an x86_64 machine with > --target_board={unix/-m32}. > OK for mainline? > > Signed-off-by: Jennifer Schmitz <jschm...@nvidia.com> > > gcc/testsuite/ > PR testsuite/117704 > * gcc.dg/tree-ssa/pow_fold_1.c: Add -msse -mfpmath=sse+387 > for i?86-*-*. > --- > gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c > b/gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c > index d98bcb0827e..cb9d52e9653 100644 > --- a/gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c > +++ b/gcc/testsuite/gcc.dg/tree-ssa/pow_fold_1.c > @@ -1,6 +1,7 @@ > /* { dg-do compile } */ > /* { dg-options "-Ofast -fdump-tree-optimized -fexcess-precision=16" } */ > /* { dg-add-options float16 } */ > +/* { dg-additional-options "-msse -mfpmath=sse+387" { target { i?86-*-* } } > } */
i?86-*-* shouldn't be used in target selectors alone, it doesn't mean much. One can also use -m32 on x86_64-*-*, or i?86-*-* can be multilib compiler. So, either it should be i?86-*-* x86_64-*-* or if one wants to limit it just to 32-bit compilation on that target (but why in this case?), then ia32 or { i?86-*-* x86_64-*-* } && ia32 etc. > /* { dg-require-effective-target float16_runtime } */ > /* { dg-require-effective-target c99_runtime } */ Jakub