https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41453

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #15 from Mikael Morin <mikael at gcc dot gnu.org> ---
Status update:

(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.

> - intent(out) variables on entry to the procedure.
This remains to do.

(In reply to Thomas Koenig from comment #7)
> Also still to do: Do some more precise clobbering for
> the case of PR88364, i.e. for
> 
> call foo(a&x)
> 
> clobber a%x, which is currently not done.

This is impossible for now on the caller side because of lack of middle-end
support: only full variable declarations can be clobbered, or pointer targets.
There was a patch to handle the case above, but it was dropped for that reason.
See: https://gcc.gnu.org/pipermail/fortran/2022-September/058181.html
Maybe part of that patch can be resurrected, but restricted to the case of
allocatable or pointer components.

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 it's worth keeping this PR open.
Surely the initial test works as expected, and has been working for a long
time.

Reply via email to