[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |7.4 --- Comment #9 from kargl at gcc dot gnu.org --- Fixed on 7-branch, 8-branch, and trunk. Closing. Thanks for bug report.
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #8 from kargl at gcc dot gnu.org --- Author: kargl Date: Mon Jun 4 17:09:01 2018 New Revision: 261162 URL: https://gcc.gnu.org/viewcvs?rev=261162=gcc=rev Log: 2018-06-04 Steven G. Kargl PR fortran/85981 * resolve.c (resolve_allocate_deallocate): Check errmsg is default character kind. 2018-06-04 Steven G. Kargl PR fortran/85981 * gfortran.dg/allocate_alloc_opt_14.f90: New test. * gfortran.dg/allocate_alloc_opt_1.f90: Update error string. * gfortran.dg/allocate_stat_2.f90: Ditto. * gfortran.dg/deallocate_alloc_opt_1.f90: Ditto. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/resolve.c branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 branches/gcc-7-branch/gcc/testsuite/gfortran.dg/allocate_stat_2.f90 branches/gcc-7-branch/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #7 from kargl at gcc dot gnu.org --- Author: kargl Date: Mon Jun 4 16:41:31 2018 New Revision: 261160 URL: https://gcc.gnu.org/viewcvs?rev=261160=gcc=rev Log: 2018-06-04 Steven G. Kargl PR fortran/85981 * resolve.c (resolve_allocate_deallocate): Check errmsg is default character kind. 2018-06-04 Steven G. Kargl PR fortran/85981 * gfortran.dg/allocate_alloc_opt_14.f90: New test. * gfortran.dg/allocate_alloc_opt_1.f90: Update error string. * gfortran.dg/allocate_stat_2.f90: Ditto. * gfortran.dg/deallocate_alloc_opt_1.f90: Ditto. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/resolve.c branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/allocate_stat_2.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #6 from kargl at gcc dot gnu.org --- Author: kargl Date: Mon Jun 4 15:54:48 2018 New Revision: 261154 URL: https://gcc.gnu.org/viewcvs?rev=261154=gcc=rev Log: 2018-06-04 Steven G. Kargl PR fortran/85981 * resolve.c (resolve_allocate_deallocate): Check errmsg is default character kind. 2018-06-04 Steven G. Kargl PR fortran/85981 * gfortran.dg/allocate_alloc_opt_14.f90: New test. * gfortran.dg/allocate_alloc_opt_1.f90: Update error string. * gfortran.dg/allocate_stat_2.f90: Ditto. * gfortran.dg/deallocate_alloc_opt_1.f90: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/allocate_alloc_opt_14.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 trunk/gcc/testsuite/gfortran.dg/allocate_stat_2.f90 trunk/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #5 from kargl at gcc dot gnu.org --- Patch submitted. https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01694.html
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #4 from Steve Kargl --- On Tue, May 29, 2018 at 07:53:33PM +, kargl at gcc dot gnu.org wrote: > > I have a patch. > I have new patch.
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- I have a patch.
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 kargl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-05-29 CC||kargl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #1) > Works with character(kind=1) : > > > $ cat z2.f90 > program p >integer, allocatable :: arr(:) >integer :: stat >character(len=128, kind=1) :: errmsg = ' ' >allocate (arr(3), stat=stat, errmsg=errmsg) >print *, allocated(arr), stat, trim(errmsg) > end > > > $ gfortran-9-20180527 z2.f90 -static-libgfortran > $ a.out > T 0 It ought to work with kind=1. For the original code, and error message should be issued as kind=4 is not default character kind. R928 alloc-opt is ERRMSG = errmsg-variable R930 errmsg-variable is scalar-default-char-variable R906 default-char-variable is variable C906 default-char-variable shall be default character.
[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85981 --- Comment #1 from G. Steinmetz --- Works with character(kind=1) : $ cat z2.f90 program p integer, allocatable :: arr(:) integer :: stat character(len=128, kind=1) :: errmsg = ' ' allocate (arr(3), stat=stat, errmsg=errmsg) print *, allocated(arr), stat, trim(errmsg) end $ gfortran-9-20180527 z2.f90 -static-libgfortran $ a.out T 0