------- Comment #10 from burnus at gcc dot gnu dot org 2010-01-23 17:59 ------- (In reply to comment #7) > See previous comment - this should be suspended with PR38471. It puts the > pressure on me to start on the array descriptor work:-(
I think there are actually two issues - one is the SPAN/array descriptor issue, which causes an ICE if one calls the specific function directly, cf. PR 42851 for the ICE I get there. But there seems to be an other problem: Namely, the interface of the specific function "SD" is used instead of "SD_matrix" as the following program shows (cf. comment 5). I think that problem is similar to the one at PR 41777. MODULE deriv_class IMPLICIT NONE TYPE func REAL :: value, xx(1) END TYPE func INTERFACE SD MODULE PROCEDURE SD, sd_matrix END INTERFACE CONTAINS FUNCTION SD(x) RESULT (res) TYPE (func), INTENT (in), TARGET :: x REAL , DIMENSION (:), POINTER :: res res => x%xx END FUNCTION SD FUNCTION SD_matrix(x) RESULT (res) TYPE (func), DIMENSION (:, :), INTENT (in), TARGET :: x REAL , DIMENSION (:, :), POINTER :: res res => x(1,1)%xx END FUNCTION SD_matrix FUNCTION matmul_k21(a) RESULT (res) TYPE (func), DIMENSION (:, :), INTENT (in) :: a TYPE (func), DIMENSION (SIZE(a, 1)), TARGET :: res REAL, DIMENSION (:), POINTER :: ptr ptr = MATMUL(SD(a), (/ 1 /)) END FUNCTION matmul_k21 END MODULE deriv_class -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39304