re PR sanitizer/79341 (Many Asan tests fail on s390)
authorJakub Jelinek <jakub@redhat.com>
Mon, 13 Feb 2017 23:09:09 +0000 (00:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 13 Feb 2017 23:09:09 +0000 (00:09 +0100)
PR sanitizer/79341
* c-c++-common/ubsan/float-cast-overflow-8.c (TEST): Make min and max
variables volatile.

From-SVN: r245411

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

index 281aca05594dcb05cb313064f34e2f4cd3f766e1..c92cff7440f8192591b94f156f4b97612ecaadb1 100644 (file)
@@ -1,5 +1,9 @@
 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
 
+       PR sanitizer/79341
+       * c-c++-common/ubsan/float-cast-overflow-8.c (TEST): Make min and max
+       variables volatile.
+
        PR c++/79232
        * g++.dg/cpp1z/eval-order4.C: New test.
        * g++.dg/other/pr79232.C: New test.
index 4adb22ae3b4711fe75329cf77131e237a0cf711b..1b51609cf0767892fb625ff9088b8a70a5c64ef5 100644 (file)
@@ -8,7 +8,7 @@
 #define TEST(type1, type2) \
   if (type1##_MIN)                                             \
     {                                                          \
-      type2 min = type1##_MIN;                                 \
+      volatile type2 min = type1##_MIN;                                \
       type2 add = -1.0;                                                \
       while (1)                                                        \
        {                                                       \
@@ -28,7 +28,7 @@
       volatile type1 tem3 = cvt_##type1##_##type2 (-1.0f);     \
     }                                                          \
   {                                                            \
-    type2 max = type1##_MAX;                                   \
+    volatile type2 max = type1##_MAX;                          \
     type2 add = 1.0;                                           \
     while (1)                                                  \
       {                                                                \