diff options
author | Jason Merrill <jason@redhat.com> | 2010-11-03 11:33:05 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-11-03 11:33:05 -0400 |
commit | a76c13bf23a6ccccbcf3abd18f07ab31444a5add (patch) | |
tree | c393a49d0c8a1b260eabf6894631563b24a4ed90 /gcc/cp | |
parent | 836dda671ab51efe7d749166546e34c8c4296bee (diff) | |
download | gcc-a76c13bf23a6ccccbcf3abd18f07ab31444a5add.zip gcc-a76c13bf23a6ccccbcf3abd18f07ab31444a5add.tar.gz gcc-a76c13bf23a6ccccbcf3abd18f07ab31444a5add.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 24783f5..34996fc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-11-03 Jason Merrill <jason@redhat.com> + + PR c++/46277 + * init.c (expand_default_init): Avoid ICE if we can't figure out + which function is being called. + 2010-11-02 Nathan Froyd <froydnj@codesourcery.com> * class.c (build_base_path, add_vcall_offset): Use build_zero_cst 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)) |