------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-28 00:24 -------
(In reply to comment #3)
> I wouldn't call this a regression; I don't think there's any guarantee that
> unused statics stay around, even with -O0.  

It is a regression as turning on unit-at-a-time at -O0 changed it.

> However, I tend to agree that it would be better if they did stay around at
> -O0.  In other words, I wouldn't be opposed to adding such a guarantee.
> Do we know if this is a front-end problem or a cgraph problem? 

I think this is a cgraph issue but that is only because nobody thought unit
at a time would be enabled at -O0 when it was first made.

> Is cgraph
> throwing stuff away at -O0, or are we not telling cgraph about the variable?

cgraph is throwing things away when unit-at-a-time is enabled which is all the
time with C++ in 4.0 and above.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24561

Reply via email to