! { dg-do compile }
-! { dg-options "-w" }
-! FIXME: Remove -w once CLASS is fully supported.
! Type-bound procedures
! Checks for correct errors with invalid OPERATOR/ASSIGNMENT usage.
PROCEDURE, NOPASS :: nopassed => onearg
PROCEDURE, PASS :: threearg
PROCEDURE, PASS :: sub
- PROCEDURE, PASS :: sub2 ! { dg-error "must be a FUNCTION" }
+ PROCEDURE, PASS :: sub2
PROCEDURE, PASS :: func
! These give errors at the targets' definitions.
LOGICAL FUNCTION func (me, b) ! { dg-error "must be a SUBROUTINE" }
CLASS(t), INTENT(OUT) :: me
CLASS(t), INTENT(IN) :: b
- me = t ()
func = .TRUE.
END FUNCTION func
CLASS(t), INTENT(IN) :: a
END SUBROUTINE sub
- SUBROUTINE sub2 (a, x)
+ SUBROUTINE sub2 (a, x) ! { dg-error "must be a FUNCTION" }
CLASS(t), INTENT(IN) :: a
INTEGER, INTENT(IN) :: x
END SUBROUTINE sub2