aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2008-08-30 00:30:18 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2008-08-30 00:30:18 +0100
commit109e637b7b371beb86d14e0bcfb63e93ab72a4f4 (patch)
tree32335413daebce13b9d8208c0a878230201efda1 /gcc
parent3852d2bef61369090fbf7cdab2980b36e281f2b8 (diff)
downloadgcc-109e637b7b371beb86d14e0bcfb63e93ab72a4f4.zip
gcc-109e637b7b371beb86d14e0bcfb63e93ab72a4f4.tar.gz
gcc-109e637b7b371beb86d14e0bcfb63e93ab72a4f4.tar.bz2
re PR bootstrap/37086 (GCC 3.4 miscompiles trunk (for cross compiling))
PR bootstrap/37086 * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC versions before 4.0. From-SVN: r139792
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-vrp.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e770abe..f8fcf7b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR bootstrap/37086
+ * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC
+ versions before 4.0.
+
2008-08-29 Jan Hubicka <jh@suse.cz>
* tree-inline.c (insert_init_stmt): Insert sequence even when
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 7579ee1..348382e 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -4333,7 +4333,12 @@ find_switch_asserts (basic_block bb, gimple last)
edge e;
tree vec2;
size_t n = gimple_switch_num_labels(last);
+#if GCC_VERSION >= 4000
unsigned int idx;
+#else
+ /* Work around GCC 3.4 bug (PR 37086). */
+ volatile unsigned int idx;
+#endif
need_assert = false;
bsi = gsi_for_stmt (last);