1! RUN: %S/test_errors.sh %s %t %f18 2module m 3! C730 The same type-attr-spec shall not appear more than once in a given 4! derived-type-stmt. 5! 6! R727 derived-type-stmt -> 7! TYPE [[, type-attr-spec-list] ::] type-name [( type-param-name-list )] 8! type-attr-spec values are: 9! ABSTRACT, PUBLIC, PRIVATE, BIND(C), EXTENDS(parent-type-name) 10 !WARNING: Attribute 'ABSTRACT' cannot be used more than once 11 type, abstract, public, abstract :: derived1 12 end type derived1 13 14 !WARNING: Attribute 'PUBLIC' cannot be used more than once 15 type, public, abstract, public :: derived2 16 end type derived2 17 18 !WARNING: Attribute 'PRIVATE' cannot be used more than once 19 type, private, abstract, private :: derived3 20 end type derived3 21 22 !ERROR: Attributes 'PUBLIC' and 'PRIVATE' conflict with each other 23 type, public, abstract, private :: derived4 24 end type derived4 25 26 !WARNING: Attribute 'BIND(C)' cannot be used more than once 27 type, bind(c), public, bind(c) :: derived5 28 end type derived5 29 30 type, public :: derived6 31 end type derived6 32 33 !ERROR: Attribute 'EXTENDS' cannot be used more than once 34 type, extends(derived6), public, extends(derived6) :: derived7 35 end type derived7 36 37end module m 38