62 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3!C778 The same binding-attr shall not appear more than once in a given4!binding-attr-list.5!6!R749 type-bound-procedure-stmt7! PROCEDURE [ [ ,binding-attr-list] :: ]type-bound-proc-decl-list8! or PROCEDURE (interface-name),binding-attr-list::binding-name-list9!10!11! binding-attr values are:12! PUBLIC, PRIVATE, DEFERRED, NON_OVERRIDABLE, NOPASS, PASS [ (arg-name) ]13!14 type, abstract :: boundProcType15 contains16 !WARNING: Attribute 'PUBLIC' cannot be used more than once [-Wredundant-attribute]17 procedure(subPublic), public, deferred, public :: publicBinding18 !WARNING: Attribute 'PRIVATE' cannot be used more than once [-Wredundant-attribute]19 procedure(subPrivate), private, deferred, private :: privateBinding20 !WARNING: Attribute 'DEFERRED' cannot be used more than once [-Wredundant-attribute]21 procedure(subDeferred), deferred, public, deferred :: deferredBinding22 !WARNING: Attribute 'NON_OVERRIDABLE' cannot be used more than once [-Wredundant-attribute]23 procedure, non_overridable, public, non_overridable :: subNon_overridable;24 !WARNING: Attribute 'NOPASS' cannot be used more than once [-Wredundant-attribute]25 procedure(subNopass), nopass, deferred, nopass :: nopassBinding26 !WARNING: Attribute 'PASS' cannot be used more than once [-Wredundant-attribute]27 procedure(subPass), pass, deferred, pass :: passBinding28 !ERROR: Attributes 'PASS' and 'NOPASS' conflict with each other29 procedure(subPassNopass), pass, deferred, nopass :: passNopassBinding ! C78130 end type boundProcType31 32contains33 subroutine subPublic(x)34 class(boundProcType), intent(in) :: x35 end subroutine subPublic36 37 subroutine subPrivate(x)38 class(boundProcType), intent(in) :: x39 end subroutine subPrivate40 41 subroutine subDeferred(x)42 class(boundProcType), intent(in) :: x43 end subroutine subDeferred44 45 subroutine subNon_overridable(x)46 class(boundProcType), intent(in) :: x47 end subroutine subNon_overridable48 49 subroutine subNopass(x)50 class(boundProcType), intent(in) :: x51 end subroutine subNopass52 53 subroutine subPass(x)54 class(boundProcType), intent(in) :: x55 end subroutine subPass56 57 subroutine subPassNopass(x)58 class(boundProcType), intent(in) :: x59 end subroutine subPassNopass60 61end module m62