From 98b806924df9a7bb913cc5cc2d2e7fdc7e2a5de0 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 18 Feb 2009 16:01:03 -0500 Subject: re PR target/39179 (Wrong code in c++ for const members initialized in external file) PR target/39179 * tree-ssa-ccp.c (get_symbol_constant_value): Don't assume zero value if DECL_EXTERNAL. * tree-sra.c (sra_walk_gimple_assign): Likewise. * target.h (gcc_target::binds_local_p): Clarify module. * tree.h (TREE_PUBLIC): Clarify module. From-SVN: r144270 --- gcc/tree-ssa-ccp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-ccp.c') diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index ef6890c..4627265 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -287,10 +287,11 @@ get_symbol_constant_value (tree sym) have zero as the initializer if they may not be overridden at link or run time. */ if (!val + && !DECL_EXTERNAL (sym) && targetm.binds_local_p (sym) && (INTEGRAL_TYPE_P (TREE_TYPE (sym)) || SCALAR_FLOAT_TYPE_P (TREE_TYPE (sym)))) - return fold_convert (TREE_TYPE (sym), integer_zero_node); + return fold_convert (TREE_TYPE (sym), integer_zero_node); } return NULL_TREE; -- cgit v1.1