[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 --- Comment #6 from kargl at gcc dot gnu.org --- Author: kargl Date: Fri Sep 30 21:02:56 2016 New Revision: 240679 URL: https://gcc.gnu.org/viewcvs?rev=240679&root=gcc&view=rev Log: 2016-09-30 Steven G. Kargl Backport from trunk PR fortran/69867 * decl.c (build_struct): Ensure that pointers point to something. PR fortran/69962 * decl.c (gfc_set_constant_character_len): if expr is not constant issue an error instead of an ICE. PR fortran/69962 * gfortran.dg/pr69962.f90: New test. PR fortran/69867 * gfortran.dg/pr69867.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr69867.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr69962.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/decl.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org Target Milestone|--- |7.0 --- Comment #5 from kargl at gcc dot gnu.org --- fixed on trunk.
[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 --- Comment #4 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Jul 30 19:24:49 2016 New Revision: 238906 URL: https://gcc.gnu.org/viewcvs?rev=238906&root=gcc&view=rev Log: 2016-07-30 Steven G. Kargl PR fortran/69962 * decl.c (gfc_set_constant_character_len): if expr is not constant issue an error instead of an ICE. 2016-07-30 Steven G. Kargl PR fortran/69962 * gfortran.dg/pr69962.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr69962.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 --- Comment #3 from kargl at gcc dot gnu.org --- Index: decl.c === --- decl.c (revision 237945) +++ decl.c (working copy) @@ -1485,10 +1485,14 @@ gfc_set_constant_character_len (int len, gfc_char_t *s; int slen; - gcc_assert (expr->expr_type == EXPR_CONSTANT); - if (expr->ts.type != BT_CHARACTER) return; + + if (expr->expr_type != EXPR_CONSTANT) +{ + gfc_error_now ("CHARACTER length must be a constant at %L", &expr->where); + return; +} slen = expr->value.character.length; if (len != slen)
[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-02-26 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (6.0).
[Bug fortran/69962] ICE on missing parameter attribute, in gfc_set_constant_character_len
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69962 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- This is fairly easy to fix.