This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64314] [5 Regression] ICE in record_reference, at cgraphbuild.c:87
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 Jan 2015 12:55:21 +0000
- Subject: [Bug c++/64314] [5 Regression] ICE in record_reference, at cgraphbuild.c:87
- Auto-submitted: auto-generated
- References: <bug-64314-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64314
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|ipa |c++
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We walk the initializer of 'a' which is
{.c={{.a=TARGET_EXPR <D.2291, <<< Unknown tree: aggr_init_expr
4
__comp_ctor
D.2291
(struct C *) <<< Unknown tree: void_cst >>> >>>>}}}
and somehow expect we never reach a VAR_DECL when doing that. What we visit
here is the TARGET_EXPR target and its use in the __comp_ctor call.
So the assert is somewhat bogus (but it certainly was designed to make
sure we capture every variable and function!). We can restrict it
to catch global vars only (as otherwise varpool_node::get_create will
ICE anyway).
But then after fixing the above we'll ICE in output_constant ...
So it seems this is a frontend bug after all and TARGET_EXPRs shouldn't
appear here.