https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41453
--- Comment #16 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Mikael Morin from comment #15) > Status update: A lot of progress :-) > (In reply to Thomas Koenig from comment #5) > > Still missing: To clobber > > > > - variables passed by reference to the caller > > - saved variables > > - associated variables (there are passed as pointers to > > the associate blocsk) > These have been done now. > > Still missing: pointer or allocatable dummy. > Seems doable, probably a low hanging fruit. For an allocatable dummy, we have to deallocate on intent(out) anyway, and we do this on the caller's side, so we should not clobber. For pointers, it could be an advantage. > > - intent(out) variables on entry to the procedure. > This remains to do. Again, sounds doable > Another case that could be handled is the case of arrays: > when the full array is passed as argument, and it is contiguous, and maybe > some other condition, we can clobber its decl. The hard part is the "maybe > some other condition". Not sure what that other condition could be. If we have a full array ref, as per gfc_full_array_ref_p, and we pass this to an intent(out) argument, then that should be enough. > Not sure it's worth keeping this PR open. > Surely the initial test works as expected, and has been working for a long > time. There are still a few open points in relation to this. I would be in favor of keeping this open (to not lose the discussion) until we have them all fixed, or decide not to fix some or all of them.