This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23171] [4.1 Regression] ICE on pointer initialization with C99 initializer



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]