[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |5.3 --- Comment #7 from kargl at gcc dot gnu.org --- Fixed on trunk and 5-branch. Thanks for the bug report.
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 --- Comment #6 from kargl at gcc dot gnu.org --- Author: kargl Date: Thu Oct 29 19:37:59 2015 New Revision: 229553 URL: https://gcc.gnu.org/viewcvs?rev=229553&root=gcc&view=rev Log: 2015-10-29 Steven G. Kargl PR fortran/67805 PR fortran/68108 * array.c (gfc_match_array_constructor): Check for error from type spec matching. * decl.c (char_len_param_value): Check for valid of charlen parameter. Check for REF_ARRAY. Reap dead code dating to 2008. match.c (gfc_match_type_spec): Special case the keyword use in REAL. 2015-10-29 Steven G. Kargl PR fortran/67805 PR fortran/68108 * gfortran.dg/pr67805.f90: New testcase. * gfortran.dg/pr67805_2.f90: New test. * gfortran.dg/array_constructor_26.f03: Update testcase. * gfortran.dg/array_constructor_27.f03: Ditto. * gfortran.dg/char_type_len_2.f90: Ditto. * gfortran.dg/pr67802.f90: Ditto. * gfortran.dg/used_before_typed_3.f90: Ditto. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67805.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67805_2.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/array.c branches/gcc-5-branch/gcc/fortran/decl.c branches/gcc-5-branch/gcc/fortran/match.c branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/testsuite/gfortran.dg/array_constructor_26.f03 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/array_constructor_27.f03 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/char_type_len_2.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/large_real_kind_3.F90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr67802.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 --- Comment #5 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Oct 24 16:20:26 2015 New Revision: 229287 URL: https://gcc.gnu.org/viewcvs?rev=229287&root=gcc&view=rev Log: 2015-10-24 Steven G. Kargl PR fortran/67805 * array.c (gfc_match_array_constructor): Check for error from type spec matching. * decl.c (char_len_param_value): Check for valid of charlen parameter. Reap dead code dating to 2008. match.c (gfc_match_type_spec): Special case the keyword use in REAL. 2015-10-24 Steven G. Kargl PR fortran/67805 * gfortran.dg/pr67805.f90: New testcase. * gfortran.dg/array_constructor_26.f03: Update testcase. * gfortran.dg/array_constructor_27.f03: Ditto. * gfortran.dg/char_type_len_2.f90: Ditto. * gfortran.dg/pr67802.f90: Ditto. * gfortran.dg/used_before_typed_3.f90: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/pr67805.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/array.c trunk/gcc/fortran/decl.c trunk/gcc/fortran/match.c trunk/gcc/testsuite/gfortran.dg/array_constructor_26.f03 trunk/gcc/testsuite/gfortran.dg/array_constructor_27.f03 trunk/gcc/testsuite/gfortran.dg/char_type_len_2.f90 trunk/gcc/testsuite/gfortran.dg/large_real_kind_3.F90 trunk/gcc/testsuite/gfortran.dg/pr67802.f90 trunk/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- I have patch cooking. It works for everything except the use of NULL() ! s = [character(null()) :: 'x', 'y'] ! This should cause an error. ! print *, '6: ', [character(null()) :: 'x', 'y'] ! This should cause an error. and an array integer, parameter :: m(3) = [1, 2, 3] character(len=1) s(2) s = [character(m(1)) :: 'x', 'y'] ! OK. s = [character(m) :: 'x', 'y'] ! This should cause an error. s = [character(m(2:3)) :: 'x', 'y']! This should cause an error.
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 Dominique d'Humieres changed: What|Removed |Added Keywords||ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed||2015-10-10 Ever confirmed|0 |1 Known to fail||4.8.5, 4.9.3, 5.2.0, 6.0 --- Comment #3 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (6.0).
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 --- Comment #2 from Gerhard Steinmetz --- And these variants are silently accepted : $ cat z5.f90 program p print *, '1: ', [character(.true.) :: 'x', 'y'] print *, '2: ', [character(.false.) :: 'x', 'y'] print *, '3: ', [character(1.) :: 'x', 'y'] print *, '4: ', [character(1d1) :: 'x', 'y'] print *, '5: ', [character((0.,1.)) :: 'x', 'y'] print *, '6: ', [character(null()) :: 'x', 'y'] end $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z5.f90 $ a.out 1: xy 2: 3: xy 4: xyy 5: 6:
[Bug fortran/67805] ICE on array constructor with wrong character specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67805 --- Comment #1 from Gerhard Steinmetz --- For these variants : $ cat z4.f90 program p print *, [character([.true.]) :: 'x', 'y'] print *, [character([.false.]) :: 'x', 'y'] print *, [character([1.]) :: 'x', 'y'] print *, [character([1d1]) :: 'x', 'y'] print *, [character([(0.,1.)]) :: 'x', 'y'] print *, [character([null()]) :: 'x', 'y'] end $ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z4.f90 internal compiler error: in gfc_conv_array_constructor_expr, at fortran/trans-expr.c:6326