------- Comment #6 from hjl dot tools at gmail dot com 2008-03-07 14:24 ------- This patch
--- tree-ssa-ccp.c.local 2008-03-06 14:18:27.000000000 -0800 +++ tree-ssa-ccp.c 2008-03-07 06:21:57.000000000 -0800 @@ -306,9 +306,10 @@ get_symbol_constant_value (tree sym) if (val && ccp_decl_initial_min_invariant (val)) return val; - /* Variables declared 'const' without an initializer + /* Local variables declared 'const' without an initializer have zero as the intializer. */ if (!val + && !TREE_PUBLIC (sym) && (INTEGRAL_TYPE_P (TREE_TYPE (sym)) || SCALAR_FLOAT_TYPE_P (TREE_TYPE (sym)))) return fold_convert (TREE_TYPE (sym), integer_zero_node); works on small C++ testcase. I will try 483.xalancbmk next. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35494