On Tue, Jul 18, 2017 at 01:44:21PM +0200, Martin Liška wrote: > gcc/testsuite/ChangeLog: > > 2017-07-17 Martin Liska <mli...@suse.cz> > > PR sanitizer/63361 > * c-c++-common/ubsan/float-cast-overflow-1.c: Add either > -ffloat-store or -mieee for targets that need it. > --- > gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c > b/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c > index cd6941c9d30..a25e8dea29e 100644 > --- a/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c > +++ b/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c > @@ -1,6 +1,7 @@ > /* { dg-do run { target { lp64 || ilp32 } } } */ > +/* { dg-additional-options "-mfloat-store" { target { ia32 m68k-*-* } } } */
-ffloat-store, not -mfloat-store, that doesn't exist. I wonder if one can mix effective target names with target tripplets this way. If it works, fine, otherwise I guess you'd need { { ia32 } || { m68k-*-* } } or something similar. Can you please test it? First make sure that for RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} ubsan.exp=float-cast-overflow-1.c' you get -ffloat-store for 32-bit and not 64-bit. I guess you don't have m68k-*-* target around, so next step I'd temporarily change that m68k to x86_64 and retry and see if it enabled on both. > +/* { dg-additional-options "-mieee" { target { alpha* sh* } } } */ I'd prefer alpha*-*-* sh*-*-* > /* { dg-options "-fsanitize=float-cast-overflow" } */ > -/* { dg-additional-options "-msse2 -mfpmath=sse" { target { sse2_runtime && > ia32 } } } */ Jakub