Le 03/01/2022 à 20:45, Harald Anlauf via Fortran a écrit :
Dear all,
the initial-data-target for a pointer initialization can be either
NULL() or a non-constant target. In the latter case subscripts of
the target specification (or substring starting and ending points)
must be constant expressions. The patch adds corresponding checks.
I have verified that current Intel and Cray compilers generate similar
errors for the testcase.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Hello,
There is gfc_check_pointer_assign which does already various checks
relating to pointer assignment, and those with is_init_expr == true
could be tightened a bit.
OK with your additional checks moved there.
Thanks.