]> gcc.gnu.org Git - gcc.git/commit
fortran: Move the clobber generation code
authorMikael Morin <mikael@gcc.gnu.org>
Wed, 31 Aug 2022 09:00:45 +0000 (11:00 +0200)
committerMikael Morin <mikael@gcc.gnu.org>
Sun, 25 Sep 2022 12:44:53 +0000 (14:44 +0200)
commit2b393f6f83903cb836676bbd042c1b99a6e7e6f7
tree11dda7d311f3477abab35c27decdf9ea87544c25
parent323c38c915f34883439e9e53b9eac5fe07cb8378
fortran: Move the clobber generation code

This change inlines the clobber generation code from
gfc_conv_expr_reference to the single caller from where the add_clobber
flag can be true, and removes the add_clobber argument.

What motivates this is the standard making the procedure call a cause
for a variable to become undefined, which translates to a clobber
generation, so clobber generation should be closely related to procedure
call generation, whereas it is rather orthogonal to variable reference
generation.  Thus the generation of the clobber feels more appropriate
in gfc_conv_procedure_call than in gfc_conv_expr_reference.

Behaviour remains unchanged.

gcc/fortran/ChangeLog:

* trans.h (gfc_conv_expr_reference): Remove add_clobber
argument.
* trans-expr.cc (gfc_conv_expr_reference): Ditto. Inline code
depending on add_clobber and conditions controlling it ...
(gfc_conv_procedure_call): ... to here.
gcc/fortran/trans-expr.cc
gcc/fortran/trans.h
This page took 0.056992 seconds and 5 git commands to generate.