Fix an UBSAN test-case (PR sanitizer/63361).
authorMartin Liska <mliska@suse.cz>
Wed, 19 Jul 2017 06:50:34 +0000 (08:50 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 19 Jul 2017 06:50:34 +0000 (06:50 +0000)
2017-07-19  Martin Liska  <mliska@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.

From-SVN: r250336

gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-1.c

index 4687e45d36ceffab7507fb508622d9de6697fd69..a688b31bbcc1f9cc9e194782785a877beb6660a6 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-19  Martin Liska  <mliska@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.
+
 2017-07-18  Tom de Vries  <tom@codesourcery.com>
 
        PR middle-end/81464
index cd6941c9d30e6c0ee235519156ca397521523c7c..aae88aa3180070a1f3d14b06bc3d990f22749b9f 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do run { target { lp64 || ilp32 } } } */
 /* { dg-options "-fsanitize=float-cast-overflow" } */
-/* { dg-additional-options "-msse2 -mfpmath=sse" { target { sse2_runtime && ia32 } } } */
+/* { dg-additional-options "-ffloat-store" { target { ia32 } } } */
+/* { dg-additional-options "-mieee" { target { { alpha*-*-* } || { sh*-*-* } } } } */
 
 #include <limits.h>
 #include "float-cast.h"