[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 kargl at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.3 --- Comment #6 from kargl at gcc dot gnu.org --- Fixed on trunk and 9-branch. Closing.
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 --- Comment #5 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Oct 5 04:05:05 2019 New Revision: 276620 URL: https://gcc.gnu.org/viewcvs?rev=276620&root=gcc&view=rev Log: 2019-10-04 Steven G. Kargl PR fortran/91942 * io.c (match_vtag): Check for non-NULL result->symtree. (match_out_tag): Check for invalid constant due to inquiry parameter. (match_filepos): Instead of a syntax error, go to cleanup to get better error messages. 2019-10-04 Steven G. Kargl PR fortran/91942 * gfortran.dg/pr91587.f90: Update dg-error regex. * gfortran.dg/pr91942.f90: New test. Added: branches/gcc-9-branch/gcc/testsuite/gfortran.dg/pr91942.f90 Modified: branches/gcc-9-branch/gcc/fortran/ChangeLog branches/gcc-9-branch/gcc/fortran/io.c branches/gcc-9-branch/gcc/testsuite/ChangeLog branches/gcc-9-branch/gcc/testsuite/gfortran.dg/pr91587.f90
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 --- Comment #4 from kargl at gcc dot gnu.org --- Author: kargl Date: Wed Oct 2 17:04:57 2019 New Revision: 276472 URL: https://gcc.gnu.org/viewcvs?rev=276472&root=gcc&view=rev Log: 2019-10-02 Steven G. Kargl PR fortran/91942 * io.c (match_vtag): Check for non-NULL result->symtree. (match_out_tag): Check for invalid constant due to inquiry parameter. (match_filepos): Instead of a syntax error, go to cleanup to get better error messages. 2019-10-02 Steven G. Kargl PR fortran/91942 * gfortran.dg/pr91587.f90: Update dg-error regex. * gfortran.dg/pr91942.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr91942.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/io.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/pr91587.f90
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 --- Comment #3 from Steve Kargl --- Index: gcc/fortran/io.c === --- gcc/fortran/io.c(revision 276271) +++ gcc/fortran/io.c(working copy) @@ -1469,7 +1469,7 @@ match_vtag (const io_tag *tag, gfc_expr **v) return m; m = gfc_match (tag->value, &result); - if (m != MATCH_YES) + if (m != MATCH_YES || result->expr_type == EXPR_CONSTANT) { gfc_error ("Invalid value for %s specification at %C", tag->name); return MATCH_ERROR; @@ -2845,7 +2845,7 @@ match_filepos (gfc_statement st, gfc_exec_op op) m = match_file_element (fp); if (m == MATCH_ERROR) -goto syntax; +goto cleanup; if (m == MATCH_NO) { m = gfc_match_expr (&fp->unit);
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 CC||kargl at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- I have a patch.
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 kargl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-09-30 Ever confirmed|0 |1
[Bug fortran/91942] ICE in match_vtag, at fortran/io.c:1485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91942 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Some other cases and specifier : $ cat z4.f90 program p integer :: i inquire (1, iostat=i%kind) open (1, iostat=i%kind) read (1, iostat=i%kind) write (1, iostat=i%kind) write (1, id=i%kind) write (1, size=i%kind) open (1, iostat=i%kind) close (1, iostat=i%kind) open (newunit=i%kind) inquire (iolength=i%kind) inquire (1, exist=i%kind) inquire (1, opened=i%kind) inquire (1, pos=i%kind) inquire (1, recl=i%kind) !... end $ cat z5.f90 program p character :: i inquire (1, iostat=i%len) open (1, iostat=i%len) read (1, iostat=i%len) write (1, iostat=i%len) write (1, id=i%len) write (1, size=i%len) open (1, iostat=i%len) close (1, iostat=i%len) open (newunit=i%len) inquire (iolength=i%len) inquire (1, exist=i%len) inquire (1, opened=i%len) inquire (1, pos=i%len) inquire (1, recl=i%len) !... end