1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic 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 !WARNING: A derived type with the BIND attribute should not be empty 28 type, bind(c), public, bind(c) :: derived5 29 end type derived5 30 31 type, public :: derived6 32 end type derived6 33 34 !ERROR: Attribute 'EXTENDS' cannot be used more than once 35 type, extends(derived6), public, extends(derived6) :: derived7 36 end type derived7 37 38end module m 39