On Fri, Feb 04, 2022 at 12:39:53PM +0100, Tobias Burnus wrote: > Already during parsing, the allocatable character array assignment > x = (x) > > is converted to two gfc_codes with EXEC_ASSIGN, namely: > > ASSIGN z1:_F.DA0(FULL) (parens z1:x(FULL)) > ASSIGN z1:x(FULL) z1:_F.DA0(FULL) > > But the current code expects only one gfc_code - as parse.c does some > checks, that's unexpected for resolution and currently is checked with > an gcc_assert. > > Solution: I now defer the gfc_assert until after diagnosing the arguments. > > OK for mainline (only affected version)? > > Tobias > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 > München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas > Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht > München, HRB 106955
> Fortran/OpenMP: Avoid ICE for invalid char array in omp atomic [PR104329] > > PR fortran/104329 > gcc/fortran/ChangeLog: > > * openmp.cc (resolve_omp_atomic): Defer extra-code assert after > other diagnostics. > > gcc/testsuite/ChangeLog: > > * gfortran.dg/gomp/atomic-28.f90: New test. > > gcc/fortran/openmp.cc | 11 ++++++++--- > gcc/testsuite/gfortran.dg/gomp/atomic-28.f90 | 28 > ++++++++++++++++++++++++++++ > 2 files changed, 36 insertions(+), 3 deletions(-) Ok, thanks. Jakub