[Bug fortran/40164] New: Fortran 2003: "Arrays of procedure pointers"
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri May 15 18:22:00 GMT 2009
PROGRAM test_prog
TYPE ProcPointerArray
PROCEDURE(add), POINTER, NOPASS :: f
END TYPE ProcPointerArray
TYPE (ProcPointerArray) :: f_array(1)
PROCEDURE(add), POINTER :: f
f_array(1)%f => add
f => f_array(1)%f
PRINT*, f(2.,4.)
CONTAINS
FUNCTION add(a,b) RESULT(sum)
REAL, INTENT(in) :: a, b
REAL :: sum
sum = a + b
END FUNCTION add
END PROGRAM test_prog
This produces the error
f => f_array(1)%f
1
Error: VARIABLE attribute of 'f_array' conflicts with PROCEDURE attribute at
(1)
Reported by Barron Bichon.
--
Summary: Fortran 2003: "Arrays of procedure pointers"
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40164
More information about the Gcc-bugs
mailing list