Re: [Patch, fortran] PR fortran/82376 - Duplicate function call using -fcheck=pointer

2021-04-25 Thread Paul Richard Thomas via Fortran
Hi José! The fix is fine. Note however that the testcase will pass even without the fix because you haven't included the ! { dg-options "-fcheck=pointer" }. In fact, I suggest that you use the version of the tescase that I have attached that does not run but counts the number of occurrences of

[Patch, fortran] PR fortran/82376 - Duplicate function call using -fcheck=pointer

2021-04-22 Thread José Rui Faustino de Sousa via Fortran
Hi All! Proposed patch to: PR82376 - Duplicate function call using -fcheck=pointer Patch tested only on x86_64-pc-linux-gnu. Evaluate function result and then pass a pointer, instead of a reference to the function itself, thus avoiding multiple evaluations of the function. Thank you very