]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/37086 (GCC 3.4 miscompiles trunk (for cross compiling))
authorJoseph Myers <joseph@codesourcery.com>
Fri, 29 Aug 2008 23:30:18 +0000 (00:30 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 29 Aug 2008 23:30:18 +0000 (00:30 +0100)
PR bootstrap/37086
* tree-vrp.c (find_switch_asserts): Make idx volatile for GCC
versions before 4.0.

From-SVN: r139792

gcc/ChangeLog
gcc/tree-vrp.c

index e770abe3a9455d72dbe312c11e06bcf43dbd1a6a..f8fcf7bbf416bfaa2a95665b4a10578505c24555 100644 (file)
@@ -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
index 7579ee1330b4f06fef2eb260b264d9fbd6bfb9f7..348382ecae3d3979b8a8ba6abf2a6e18db9f8721 100644 (file)
@@ -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);