[Bug fortran/102621] ICE in convert_nonlocal_reference_op, at tree-nested.c:1166 since r12-1108-g9a5de4d5af1c10a8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102621 --- Comment #4 from CVS Commits --- The master branch has been updated by Sandra Loosemore : https://gcc.gnu.org/g:d2ad748eeef0dd260f3993b8dcbffbded3240a0a commit r12-6780-gd2ad748eeef0dd260f3993b8dcbffbded3240a0a Author: Sandra Loosemore Date: Thu Jan 20 13:29:48 2022 -0800 Fortran: Fix scope for OMP AFFINITY clause iterator variables [PR103695] gfc_finish_var_decl was confused by the undocumented overloading of the proc_name field in struct gfc_namespace to contain iterator variables for the OpenMP AFFINITY clause, causing it to insert the decls in the wrong scope. This patch adds a new distinct field to hold these variables. 2022-01-20 Sandra Loosemore PR fortran/103695 PR fortran/102621 gcc/fortran * gfortran.h (struct gfc_namespace) Add omp_affinity_iterator field. * dump-parse-tree.cc (show_iterator): Use it. * openmp.cc (gfc_match_iterator): Likewise. (resolve_omp_clauses): Likewise. * trans-decl.cc (gfc_finish_var_decl): Likewise. * trans-openmp.cc (handle_iterator): Likewise. gcc/testsuite/ * gfortran.dg/gomp/affinity-clause-3.f90: Adjust pattern. * gfortran.dg/gomp/pr102621.f90: New. * gfortran.dg/gomp/pr103695.f90: New.
[Bug fortran/102621] ICE in convert_nonlocal_reference_op, at tree-nested.c:1166 since r12-1108-g9a5de4d5af1c10a8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102621 sandra at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED CC||sandra at gcc dot gnu.org --- Comment #3 from sandra at gcc dot gnu.org --- This is the same problem as PR103695, or at least it's fixed by the same patch. *** This bug has been marked as a duplicate of bug 103695 ***
[Bug fortran/102621] ICE in convert_nonlocal_reference_op, at tree-nested.c:1166 since r12-1108-g9a5de4d5af1c10a8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102621 Richard Biener changed: What|Removed |Added Target Milestone|12.0|--- Summary|[12 Regression] ICE in |ICE in |convert_nonlocal_reference_ |convert_nonlocal_reference_ |op, at tree-nested.c:1166 |op, at tree-nested.c:1166 |since |since |r12-1108-g9a5de4d5af1c10a8 |r12-1108-g9a5de4d5af1c10a8 --- Comment #2 from Richard Biener --- It's not clear that only Fortran is affected but GCC 11 rejected the code with t.f90:3:15: 3 |!$omp task affinity (iterator(j=1:8) : a(j)) | 1 Error: Failed to match clause at (1) t.f90:4:17: 4 |!$omp end task | 1 Error: Unexpected !$OMP END TASK statement at (1) so it's not a regression.