gcc/gcc7-pr79341.patch

27 lines
859 B
Diff
Raw Normal View History

2017-02-11 09:56:13 +00:00
2017-02-10 Jakub Jelinek <jakub@redhat.com>
2017-02-09 17:55:36 +00:00
PR sanitizer/79341
2017-02-11 09:56:13 +00:00
* c-c++-common/ubsan/float-cast-overflow-8.c (TEST): Make min and max
variables volatile.
2017-02-09 17:55:36 +00:00
2017-02-11 09:56:13 +00:00
--- gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c.jj 2015-10-29 09:14:30.000000000 +0100
+++ gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c 2017-02-10 18:09:47.767251774 +0100
@@ -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) \
{ \