Skip to content
Snippets Groups Projects
Commit f25250e0 authored by Harald Anlauf's avatar Harald Anlauf
Browse files

Fortran: fix NULL without MOLD argument to scalar DT pointer dummy [PR118179]

Commit r15-6408 overlooked the case of passing NULL without MOLD argument
to a derived type pointer dummy argument without specified intent.  Since
it is prohibited to modify the dummy argument, we treat it as if intent(in)
were specified and suppress copying back of the pointer address.

	PR fortran/118179

gcc/fortran/ChangeLog:

	* trans-expr.cc (conv_null_actual): Suppress copying back of
	pointer address for unspecified intent.

gcc/testsuite/ChangeLog:

	* gfortran.dg/null_actual_7.f90: Extend testcase to also cover
	scalar variants with pointer or allocatable dummy with or without
	specified intent.
parent dae506f7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment