2 ! { dg-options "-std=f2003" }
4 ! Check enforcement of F2008 standard for MODULE PROCEDURES and SUBMODULES
5 ! This is rather bare-bones to reduce the number of error messages too the
8 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
14 module function array1(this
) result (that
) ! { dg-error "MODULE prefix" }
15 end function ! { dg-error "Expecting END INTERFACE" }
16 character(16) module function array2(this
, that
) ! { dg-error "MODULE prefix" }
17 end function ! { dg-error "Expecting END INTERFACE" }
22 SUBMODULE (foo_interface
) foo_interface_son
! { dg-error "SUBMODULE declaration" }
26 module function array1 (this
) result(that
) ! { dg-error "MODULE prefix" }
27 end function ! { dg-error "Expecting END PROGRAM" }
29 ! Test array characteristics for dummy and result are OK for
30 ! abbreviated module procedure declaration.
31 module procedure array2
! { dg-error "must be in a generic module interface" }
32 end PROCEDURE
! { dg-error "Expecting END PROGRAM" }
34 end SUBMODULE foo_interface_son
! { dg-error "Expecting END PROGRAM" }
36 end ! { dg-error "CONTAINS statement without FUNCTION or SUBROUTINE" }