[Bug fortran/88326] [7/8/9 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6085
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88326 --- Comment #7 from anlauf at gcc dot gnu.org --- Author: anlauf Date: Sat Mar 2 16:08:03 2019 New Revision: 269342 URL: https://gcc.gnu.org/viewcvs?rev=269342&root=gcc&view=rev Log: 2019-03-02 Harald Anlauf Backport from trunk PR fortran/89516 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases where storage size of elements of MOLD is 0. PR fortran/89492 * check.c (gfc_calculate_transfer_sizes): Handle cases where storage size of elements of MOLD is 0. PR fortran/89266 PR fortran/88326 * target-memory.c (gfc_element_size): Return false if element size cannot be determined; element size is returned separately. (gfc_target_expr_size): Return false if expression size cannot be determined; expression size is returned separately. * target-memory.h: Adjust prototypes. * check.c (gfc_calculate_transfer_sizes): Adjust references to gfc_target_expr_size, gfc_element_size. * arith.c (hollerith2representation): Likewise. * class.c (find_intrinsic_vtab): Likewise. * simplify.c (gfc_simplify_sizeof): Likewise. Backport from trunk PR fortran/89516 * gfortran.dg/pr89492.f90: Adjust testcase. * gfortran.dg/transfer_check_5.f90: New test. PR fortran/89492 * gfortran.dg/pr89492.f90: New test. PR fortran/89266 PR fortran/88326 * gfortran.dg/pr89266.f90: New test. * gfortran.dg/pr88326.f90: New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr88326.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr89266.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr89492.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/transfer_check_5.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/arith.c branches/gcc-8-branch/gcc/fortran/check.c branches/gcc-8-branch/gcc/fortran/class.c branches/gcc-8-branch/gcc/fortran/simplify.c branches/gcc-8-branch/gcc/fortran/target-memory.c branches/gcc-8-branch/gcc/fortran/target-memory.h branches/gcc-8-branch/gcc/testsuite/ChangeLog
[Bug fortran/88326] [7/8/9 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6085
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88326 --- Comment #6 from anlauf at gcc dot gnu.org --- Author: anlauf Date: Sun Feb 24 20:03:28 2019 New Revision: 269177 URL: https://gcc.gnu.org/viewcvs?rev=269177&root=gcc&view=rev Log: 2019-02-24 Harald Anlauf PR fortran/89266 PR fortran/88326 * target-memory.c (gfc_element_size): Return false if element size cannot be determined; element size is returned separately. (gfc_target_expr_size): Return false if expression size cannot be determined; expression size is returned separately. * target-memory.h: Adjust prototypes. * check.c (gfc_calculate_transfer_sizes): Adjust references to gfc_target_expr_size, gfc_element_size. * arith.c (hollerith2representation): Likewise. * class.c (find_intrinsic_vtab): Likewise. * simplify.c (gfc_simplify_sizeof): Likewise. PR fortran/89266 PR fortran/88326 * gfortran.dg/pr89266.f90: New test. * gfortran.dg/pr88326.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr88326.f90 trunk/gcc/testsuite/gfortran.dg/pr89266.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/arith.c trunk/gcc/fortran/check.c trunk/gcc/fortran/class.c trunk/gcc/fortran/simplify.c trunk/gcc/fortran/target-memory.c trunk/gcc/fortran/target-memory.h trunk/gcc/testsuite/ChangeLog
[Bug fortran/88326] [7/8/9 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6085
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88326 Harald Anlauf changed: What|Removed |Added CC||anlauf at gmx dot de --- Comment #5 from Harald Anlauf --- Using my tentative fix for PR89266 I now get: % gfc-x pr88326-z1.f90 pr88326-z1.f90:3:20: 3 |character :: y(1) = transfer('', x) |1 Error: Different shape for array assignment at (1) on dimension 1 (1 and 0) % gfc-x pr88326-z2.f90 pr88326-z2.f90:3:23: 3 |character(0) :: y(1) = transfer('', x) | 1 Error: Different shape for array assignment at (1) on dimension 1 (1 and 0) % gfc-x pr88326-z3.f90 (No error). Should be fixed when PR89266 is fixed.
[Bug fortran/88326] [7/8/9 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6085
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88326 Thomas Koenig changed: What|Removed |Added CC||tkoenig at gcc dot gnu.org Target Milestone|--- |7.5 Summary|ICE in |[7/8/9 Regression] ICE in |gfc_conv_array_initializer, |gfc_conv_array_initializer, |at |at |fortran/trans-array.c:6085 |fortran/trans-array.c:6085 --- Comment #4 from Thomas Koenig --- (In reply to Dominique d'Humieres from comment #3) > The change occurred between revisions r188694 (2012-06-16, error) and > r188914 (2012-06-24, ICE). > > Note that the third test in comment 0 compiles with r188694. A regression (at least this part), then.