On 4/15/25 12:01 PM, Harald Anlauf wrote:
Dear all,
the testcase in the PR shows a case where the pureness of a function
is not properly determined, even though the function is resolved, and
its attributes clearly show that it is pure, because gfc_pure_function
relies on isym or esym being set. This does not happen here, probably
because the function is used as a dummy here.
The least invasive fix seems to be to look at the symbol's attributes
when isym or esym is not set.
Regression testing lead to additional redundant error messages for two
testcases, so I opted to restrict the change to the case of functions
as dummy arguments, making this patch very safe.
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Thanks,
Harald
Yes, OK for mainline.
Thanks Herald
Jerry