[patch, fortran] Load scalar intent-in variables at the beginning of procedures
Thomas Koenig
tkoenig@netcologne.de
Sat Nov 16 20:34:00 GMT 2019
Hello world,
here is an update to the patch.
I have now included variables where the user did not specify INTENT(IN)
by checking that the dummy variables to be replaced by temporaries
are not, indeed, assigned a value. This also includes being passed
as an actual argument to a non-INTENT(IN) dummy argument.
Extending this led to being able to catch a few more bugs.
I have addes one test case to check where the new temporaries are added.
Regression-tested. The only change I see in the testsuite now is
XPASS: gfortran.dg/goacc/kernels-loop-n.f95 -O scan-tree-dump-times
parloops1 "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc
function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1
So, OK for trunk?
Regards
Thomas
2019-11-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/67202
* dump-parse-tree.c (debug): Add for gfc_namespace.
(show_code_node): Add INIT_ on dumping EXEC_INIT_ASSIGN.
* frontent-passes.c (replace_intent_in): Add prototype. New
function.
(optimize_namespace): Call it.
(sym_replacement): New struct.
(defined_code_callback): New function.
(defined_expr_callback): New function.
(replace_symbol_in_expr): New function.
2019-11-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/67202
* gfortran.dg/intent_optimize_3.f90: New test.
* gfortran.dg/intent_optimize_4.f90: New test.
* gfortran.dg/pr26246_2.f90: Add -fno-frontend-optimize to flags.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p10.diff
Type: text/x-patch
Size: 11580 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191116/59ca5f58/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intent_optimize_4.f90
Type: text/x-fortran
Size: 1393 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191116/59ca5f58/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intent_optimize_3.f90
Type: text/x-fortran
Size: 486 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191116/59ca5f58/attachment-0002.bin>
More information about the Fortran
mailing list