Hi Paul,
On 23.02.21 18:39, Paul Richard Thomas via Fortran wrote:
Can you elaborate?
The polymorphic result must be allocatable or pointer for the dynamic type
to be transmitted. This means that the function cannot be elemental. If the
result of the non-elemental function is an array, gfc responds with:
"Error: Passed-object dummy argument of ‘f’ at (1) must be scalar"
Ok, I think I understood the issue: The problem is that with 'pass', you
get a scalar as argument; and with scalars, you'd need 'elemental',
which is not permitted.
Sorry, I missed the 'pass' → 'scalar' step. I did get the 'elemental' →
nonalloc step.
All done. Note that the patch has changed slightly in resolve.c because
(1) it was the wrong version and (2) it sporadically segfaulted at line
13240.
Ups!
LGTM. Thanks for the patch!
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank
Thürauf