Hi, The problem was reported in detail here: https://gcc.gnu.org/pipermail/fortran/2020-September/055005.html and in previous messages. When resolving select type constructs, the Fortran front-end is trying to use the _gfortran_is_extension_of() library call (which is also used for the EXTENDS_TYPE_OF Fortran intrinsic). However, in doing so, it is constructing the symbol of the function call without proper formal arguments, which leads to the function call being built with a wrong arg-types in the function type tree.
This has no known impact on most targets, but it does lead to wrong code generation on aarch64-apple-darwin20, which is how this bug was identified. The attached patch simply adds proper formal argument list to the intrinsic call. Regtested on x86_64-apple-darwin19 and tested on aarch64-apple-darwin20. OK to commit? FX
is_extension_of.diff
Description: Binary data
is_extension_of.ChangeLog
Description: Binary data