MODULE M1
TYPE T1
INTEGER :: I
END TYPE T1
INTERFACE OPERATOR(+)
MODULE PROCEDURE add
END INTERFACE
CONTAINS
TYPE(T1) FUNCTION add(a,b)
TYPE(T1), INTENT(IN) :: a,b
END FUNCTION
END MODULE M1
USE M1
TYPE(T1), DIMENSION(2,2) :: a,b
a=a+b
END
> gfortran test.f90
test.f90:15.2:
a=a+b
1
Error: Operands of binary numeric operator '+' at (1) are TYPE(t1)/TYPE(t1)
the operator '+' is of course defined for TYPE(t1)/TYPE(t1).
The issue here is rank (or elemental)
--
Summary: poor error message
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38351