From: Joseph Myers Date: Fri, 29 Aug 2008 23:30:18 +0000 (+0100) Subject: re PR bootstrap/37086 (GCC 3.4 miscompiles trunk (for cross compiling)) X-Git-Tag: releases/gcc-4.4.0~2775 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=109e637b7b371beb86d14e0bcfb63e93ab72a4f4;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e770abe3a945..f8fcf7bbf416 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-08-29 Joseph Myers + + PR bootstrap/37086 + * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC + versions before 4.0. + 2008-08-29 Jan Hubicka * tree-inline.c (insert_init_stmt): Insert sequence even when diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 7579ee1330b4..348382ecae3d 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);