From 109e637b7b371beb86d14e0bcfb63e93ab72a4f4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 30 Aug 2008 00:30:18 +0100 Subject: 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 --- gcc/tree-vrp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/tree-vrp.c') 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); -- cgit v1.1