When the function result is type(c_ptr/c_funptr), and the function has
or does not have BIND(C) attribute, the function result is not taken as
the first argument of the function call in other compilers such as
gfortran and ifort. Fix it to be consistent with gfortran/ifort by
changing the abstract result type check.
Fix #58739.
As Fortran 2018 C1553, if with BIND(C), the function result shall be an interoperable scalar variable. As Fortran 2018 18.3.4(1), the
interoperable scalar variable is not a coarray, has neither the ALLOCATABLE nor the POINTER attribute, and if it is of type character its length is not assumed or declared by an expression that is not a constant expression.
So, fir::SequenceType, fir::BoxType is fine here. The derived type needs more investigations and tests.
The semantic checks will come soon.