https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88364
Bug ID: 88364 Summary: [9 Regression] Wrong-code due to CLOBBER Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: anlauf at gmx dot de, jakub at gcc dot gnu.org, rguenth at gcc dot gnu.org, unassigned at gcc dot gnu.org Depends on: 88304 Target Milestone: --- Target: x86_64-pc-linux-gnu +++ This bug was initially created as a clone of Bug #88304 +++ As mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88304#c9 I believe the CLOBBERs added in: else if (add_clobber) { tree clobber; tree var; /* FIXME: This fails if var is passed by reference, see PR 41453. */ var = expr->symtree->n.sym->backend_decl; clobber = build_clobber (TREE_TYPE (var)); gfc_add_modify (&se->pre, var, clobber); } are sometimes IMHO inappropriate, in particular if we are passing by reference only a part of some variable (when the size of the expression that actually should be clobbered is smaller than the whole backend_decl). Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88304 [Bug 88304] [9 Regression] ICE in use_pointer_in_frame, at tree-nested.c:267