[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 Andrew Benson changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Andrew Benson --- Resolved by the above commit.
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 --- Comment #8 from CVS Commits --- The master branch has been updated by Andrew Benson : https://gcc.gnu.org/g:004ac7b780308dc899e565b887c7def0a6e100f2 commit r10-6356-g004ac7b780308dc899e565b887c7def0a6e100f2 Author: Andrew Benson Date: Thu Jan 30 17:47:00 2020 + Remove check for maximum symbol name length. PR fortran/87103 * expr.c (gfc_check_conformance): Check vsnprintf for truncation. * iresolve.c (gfc_get_string): Likewise. * symbol.c (gfc_new_symbol): Remove check for maximum symbol name length. Remove redundant 0 setting of new calloc()ed gfc_symbol.
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 --- Comment #7 from Andrew Benson --- Created attachment 47735 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47735&action=edit updated patch
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 --- Comment #6 from Andrew Benson --- The patch from https://gcc.gnu.org/ml/fortran/2018-09/msg00044.html still applies cleanly to trunk (with some line offsets) and regression tests cleanly as of today. I'll attached a new version of the patch based on a diff against current trunk.
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 Thomas Koenig changed: What|Removed |Added CC||andreas at skeidsvoll dot no --- Comment #5 from Thomas Koenig --- *** Bug 91773 has been marked as a duplicate of this bug. ***
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 --- Comment #4 from Harald Anlauf --- (In reply to Dominique d'Humieres from comment #3) > Patch at https://gcc.gnu.org/ml/fortran/2018-09/msg00044.html. Status of this patch? (The ICE is still there).
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-09-08 Ever confirmed|0 |1 --- Comment #3 from Dominique d'Humieres --- Patch at https://gcc.gnu.org/ml/fortran/2018-09/msg00044.html.
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103 --- Comment #2 from Andrew Benson --- Thanks Janus. That does solve the problem, and regtests cleanly, with this patch: Index: gcc/fortran/gfortran.h === --- gcc/fortran/gfortran.h (revision 264085) +++ gcc/fortran/gfortran.h (working copy) @@ -54,7 +54,9 @@ not after. /* Major control parameters. */ -#define GFC_MAX_SYMBOL_LEN 63 /* Must be at least 63 for F2003. */ +/* Must be at least 63 for F2003, +1 for null terminator, + +12 for prefix "__tmp_class_". */ +#define GFC_MAX_SYMBOL_LEN 76 #define GFC_LETTERS 26 /* Number of letters in the alphabet. */ #define MAX_SUBRECORD_LENGTH 2147483639 /* 2**31-9 */
[Bug fortran/87103] [OOP] ICE in gfc_new_symbol() due to overlong symbol name
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.