This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23171] [4.1 Regression] ICE on pointer initialization with C99 initializer
- From: "dberlin at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2005 18:14:00 -0000
- Subject: [Bug c++/23171] [4.1 Regression] ICE on pointer initialization with C99 initializer
- References: <bug-23171-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from dberlin at gcc dot gnu dot org 2005-11-14 18:14 -------
Mark, the frontend is producing the address of a constructor, and nothing in
the middle end used to be really analyzing static iniatlizers which is why it
didn't break before (those that do try to look at them would give up in this
case, but static vars analysis can't give up without destroying the results of
the entire analysis)
IMHO, this easier to fix in the frontend than in the middle end, by simply not
producing &CONSTRUCTOR.
What exactly is ADDRESSOF(CONSTRUCTOR) anyway?
ISTM it should require a temporary variable to evaluate.
However, we can't GIMPLIFY it and do that for you because it's a static
initializer (and we don't gimplify those), so it's either teach *every single
thing that wants to look at DECL_INITIAL for a static initializer* what
ADDRESSOF(CONSTUCTOR) is supposed to mean, or make the frontend do something
like split it into two variables.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23171