------- Comment #3 from mmitchel at gcc dot gnu dot org 2005-10-28 00:11 ------- I wouldn't call this a regression; I don't think there's any guarantee that unused statics stay around, even with -O0.
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? Is cgraph throwing stuff away at -O0, or are we not telling cgraph about the variable? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24561