https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103718
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 CC| |anlauf at gcc dot gnu.org Last reconfirmed| |2021-12-14 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Target Milestone|--- |11.4 --- Comment #1 from anlauf at gcc dot gnu.org --- Patch for NULL pointer dereference: diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 57b24a11cbe..8836b40be43 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -2390,7 +2390,7 @@ doloop_contained_procedure_code (gfc_code **c, switch (co->op) { case EXEC_ASSIGN: - if (co->expr1->symtree->n.sym == do_var) + if (co->expr1->symtree && co->expr1->symtree->n.sym == do_var) gfc_error_now (errmsg, do_var->name, &co->loc, info->procedure->name, &info->where_do); break;