https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102787
--- Comment #2 from anlauf at gcc dot gnu.org --- The wrong locus for comment#1 is fixed by: diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index cfaf9d26bbc..bfb371b82c9 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -4748,7 +4748,7 @@ gfc_check_reshape (gfc_expr *source, gfc_expr *shape, gfc_error ("%qs argument of %qs intrinsic at %L has " "negative element (%d)", gfc_current_intrinsic_arg[1]->name, - gfc_current_intrinsic, &e->where, extent); + gfc_current_intrinsic, &shape->where, extent); return false; } }