https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code CC| |janus at gcc dot gnu.org Summary|ICE in gfc_new_symbol() due |[OOP] ICE in |to overlong symbol name |gfc_new_symbol() due to | |overlong symbol name --- Comment #1 from janus at gcc dot gnu.org --- (In reply to Andrew Benson from comment #0) > The following code causes an ICE with gfortan 9.0.0 (r263855): > > [..] > > The problem seems to be that gfc_new_symbol() is passed a name > '__tmp_class_namethatisverylongbutnottoolongthatitshouldbeinvalid' in this > case which exceeds GFC_MAX_SYMBOL_LEN=64. My understanding is that the code > is valid since the symbol name itself, > 'namethatisverylongbutnottoolongthatitshouldbeinvalid', is less than 64 > characters. > > I'm not sure what the correct fix for this is - should the name length limit > in gfc_new_symbol() just be increased by enough to allow the '__tmp_class_' > prefix? Yes, one could just bump GFC_MAX_SYMBOL_LEN to 64+12. Btw, in the F08 standard I find: C301 (R303) The maximum length of a name is 63 characters. I guess GFC_MAX_SYMBOL_LEN needs to be 64 in order to account for null termination.