Hello. This should address spotted in the PR, where I basically implemented what I was recommended in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63361#c14.
Ready for trunk? Thanks, Martin
>From 92ca98e49112cc164739ebd1f1a00bcc13704331 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Mon, 17 Jul 2017 15:22:25 +0200 Subject: [PATCH] Fix an UBSAN test-case (PR sanitizer/63361). 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-*-* } } } */ +/* { dg-additional-options "-mieee" { target { alpha* sh* } } } */ /* { dg-options "-fsanitize=float-cast-overflow" } */ -/* { dg-additional-options "-msse2 -mfpmath=sse" { target { sse2_runtime && ia32 } } } */ #include <limits.h> #include "float-cast.h" -- 2.13.2