From a76c13bf23a6ccccbcf3abd18f07ab31444a5add Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 3 Nov 2010 11:33:05 -0400 Subject: re PR c++/46277 (Revision 166167 failed to build 252.eon in SPEC CPU 2000) PR c++/46277 * init.c (expand_default_init): Avoid ICE if we can't figure out which function is being called. From-SVN: r166254 --- gcc/cp/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/init.c') diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 1f73d14..ab834bf 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1443,7 +1443,7 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags, if (exp == true_exp && TREE_CODE (rval) == CALL_EXPR) { tree fn = get_callee_fndecl (rval); - if (DECL_DECLARED_CONSTEXPR_P (fn)) + if (fn && DECL_DECLARED_CONSTEXPR_P (fn)) { tree e = maybe_constant_value (rval); if (TREE_CONSTANT (e)) -- cgit v1.1