https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77694
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to Gerhard Steinmetz from comment #0) > Invalid code with an unknown operator (here .nt. instead of .not.). > For versions down to at least 4.8, at -Og, -Os, -O1 or higher. > No ICE with option -fno-frontend-optimize. > > > $ cat z1.f90 > program p > logical :: x(2), y(2) > x = .true. > y = .nt. x > end Index: frontend-passes.c =================================================================== --- frontend-passes.c (revision 240220) +++ frontend-passes.c (working copy) @@ -1076,6 +1076,9 @@ optimize_binop_array_assignment (gfc_cod { gfc_expr *e; + if (!*rhs) + return false; + e = *rhs; if (e->expr_type == EXPR_OP) {