[Bug tree-optimization/65002] [5 Regression] ICE: Segmentation fault

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 11 12:33:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65002

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sure, the __attribute__((const)) looks very much wrong to me, as it returns
what the reference points, it necessarily reads memory and therefore is at most
pure, but certainly not const.

But, we must not ICE even on invalid or questionable code.  And misplaced const
attribute isn't something we should hard error on, perhaps warn (I think there
is some PR about that and it is definitely non-trivial).



More information about the Gcc-bugs mailing list