[Bug fortran/91800] ICE in gfc_code2string(): Bad code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91800 Thomas Koenig changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Thomas Koenig --- Patch committed. Thanks for the bug report and for the patch!
[Bug fortran/91800] ICE in gfc_code2string(): Bad code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91800 --- Comment #4 from CVS Commits --- The master branch has been updated by Thomas Kथà¤nig : https://gcc.gnu.org/g:38acc41d6d761b635123eefa93743b9139debbae commit r10-7811-g38acc41d6d761b635123eefa93743b9139debbae Author: Steve Kargl Date: Mon Apr 20 13:21:38 2020 +0200 PR 91800 - reject Hollerith constants as type initializer. 2020-04-20 Steve Kargl Thomas Koenig PR fortran/91800 * decl.c (variable_decl): Reject Hollerith constants as type initializer. 2020-04-20 Steve Kargl Thomas Koenig PR fortran/91800 * gfortran.dg/hollerith_9.f90: New test.
[Bug fortran/91800] ICE in gfc_code2string(): Bad code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91800 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- Patch is against svn r280157. Index: gcc/fortran/decl.c === --- gcc/fortran/decl.c (revision 280157) +++ gcc/fortran/decl.c (working copy) @@ -2879,6 +2880,15 @@ variable_decl (int elem) { gfc_error ("Initialization of allocatable component at %C is not " "allowed"); + m = MATCH_ERROR; + goto cleanup; +} + + if (gfc_current_state () == COMP_DERIVED + && initializer && initializer->ts.type == BT_HOLLERITH) +{ + gfc_error ("Initialization of structure component with a HOLLERITH " +"constant at %L is not allowed", >where); m = MATCH_ERROR; goto cleanup; }
[Bug fortran/91800] ICE in gfc_code2string(): Bad code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91800 markeggleston at gcc dot gnu.org changed: What|Removed |Added CC||markeggleston at gcc dot gnu.org --- Comment #2 from markeggleston at gcc dot gnu.org --- Regarding the ICE the Hollerith is used in a language feature that is post FORTRAN 77, I as understand it Holleriths were supposed to be removed from the language with that standard. A Hollerith used in a type definition should definitely be rejected.
[Bug fortran/91800] ICE in gfc_code2string(): Bad code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91800 Thomas Koenig changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-11-24 CC||tkoenig at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Thomas Koenig --- Maybe "bad code" isn't such a bad description of this... I wonder if people would complain if we just rejected a Hollerith constant here?