[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from kargl at gcc dot gnu.org --- Fixed on trunk and 5-branch. Thanks for the bug report.
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 --- Comment #6 from kargl at gcc dot gnu.org --- Author: kargl Date: Sun Nov 8 17:53:36 2015 New Revision: 229958 URL: https://gcc.gnu.org/viewcvs?rev=229958=gcc=rev Log: 2015-11-08 Steven G. KarglPR fortran/68153 * check.c (gfc_check_reshape): Improve check for valid SHAPE argument. 2015-11-08 Steven G. Kargl PR fortran/68153 * gfortran.dg/pr68153.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr68153.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/check.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 --- Comment #5 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Nov 7 20:18:17 2015 New Revision: 229939 URL: https://gcc.gnu.org/viewcvs?rev=229939=gcc=rev Log: 2015-11-07 Steven G. KarglPR fortran/68153 * check.c (gfc_check_reshape): Improve check for valid SHAPE argument. 2015-11-07 Steven G. Kargl PR fortran/68153 * gfortran.dg/pr68153.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr68153.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/check.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 kargl at gcc dot gnu.org changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- I have a patch.
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 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 --- This one is interesting. gfc_check_reshape isn't checking 'sh' because it thinks 'sh' is a variable instead of a named constant. So, when gfc_simplify_reshape is called, it runs into an gcc_assert that the element is greater than zero because gfc_check_reshape should have emitted an error. If the gcc_assert is removed, an error message is generated.
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 --- Comment #1 from Gerhard Steinmetz--- Detected, but pointing to the line before : $ cat z3.f90 program p integer, parameter :: sh(2) = [2, 2] integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], -sh) print *, a end $ gfortran -g -O0 -Wall -fcheck=all z3.f90 z3.f90:2:34: integer, parameter :: sh(2) = [2, 2] 1 Error: 'shape' argument of 'reshape' intrinsic at (1) has negative element (-2)
[Bug fortran/68153] ICE for intrinsic reshape with negative dim in effective shape
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68153 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2015-10-29 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (6.0). Note that the error emitted for the code in comment 1 is quite misleading.