[Bug fortran/107821] ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.cc:3723

2023-06-08 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107821

Paul Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Paul Thomas  ---
Fixed on trunk.

Thanks for the report

Paul

[Bug fortran/107821] ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.cc:3723

2023-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107821

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Paul Thomas :

https://gcc.gnu.org/g:d08f2e4f74583e27002368989bba197f8eb7f6d2

commit r14-1629-gd08f2e4f74583e27002368989bba197f8eb7f6d2
Author: Paul Thomas 
Date:   Thu Jun 8 07:11:32 2023 +0100

Fortran: Fix some more blockers in associate meta-bug [PR87477]

2023-06-08  Paul Thomas  

gcc/fortran
PR fortran/87477
PR fortran/99350
PR fortran/107821
PR fortran/109451
* decl.cc (char_len_param_value): Simplify a copy of the expr
and replace the original if there is no error.
* gfortran.h : Remove the redundant field 'rankguessed' from
'gfc_association_list'.
* resolve.cc (resolve_assoc_var): Remove refs to 'rankguessed'.
(resolve_variable): Associate names with constant or structure
constructor targets cannot have array refs.
* trans-array.cc (gfc_conv_expr_descriptor): Guard expression
character length backend decl before using it. Suppress the
assignment if lhs equals rhs.
* trans-io.cc (gfc_trans_transfer): Scalarize transfer of
associate variables pointing to a variable. Add comment.
* trans-stmt.cc (trans_associate_var): Remove requirement that
the character length be deferred before assigning the value
returned by gfc_conv_expr_descriptor. Also, guard the backend
decl before testing with VAR_P.

gcc/testsuite/
PR fortran/99350
* gfortran.dg/pr99350.f90 : New test.

PR fortran/107821
* gfortran.dg/associate_5.f03 : Changed error message.
* gfortran.dg/pr107821.f90 : New test.

PR fortran/109451
* gfortran.dg/associate_61.f90 : New test

[Bug fortran/107821] ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.cc:3723

2022-11-22 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107821

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org
   Last reconfirmed||2022-11-22
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.

Note that I also get an ICE on z0.f90 with gcc <= 12.
So we already got slightly better...