------- Comment #2 from janus at gcc dot gnu dot org 2009-05-18 12:28 ------- This test case with 'dynamic' array size produces a gimplification error:
PROGRAM test_prog ABSTRACT INTERFACE FUNCTION fn_template(n,x) RESULT(y) INTEGER, INTENT(in) :: n REAL, INTENT(in) :: x(n) REAL :: y(n) END FUNCTION fn_template END INTERFACE TYPE ProcPointerArray PROCEDURE(fn_template), POINTER, NOPASS :: f END TYPE ProcPointerArray TYPE (ProcPointerArray) :: f_array(1) PROCEDURE(fn_template), POINTER :: f REAL :: tre(2) f_array(1)%f => triple ! gimplification error f => f_array(1)%f tre = f(2,[2.,4.]) PRINT*, tre CONTAINS FUNCTION triple(n,x) RESULT(tre) INTEGER, INTENT(in) :: n REAL, INTENT(in) :: x(n) REAL :: tre(n) tre = 3.*x END FUNCTION triple END PROGRAM test_prog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40176