39 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2module m3! C730 The same type-attr-spec shall not appear more than once in a given4! 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 [-Wredundant-attribute]11 type, abstract, public, abstract :: derived112 end type derived113 14 !WARNING: Attribute 'PUBLIC' cannot be used more than once [-Wredundant-attribute]15 type, public, abstract, public :: derived216 end type derived217 18 !WARNING: Attribute 'PRIVATE' cannot be used more than once [-Wredundant-attribute]19 type, private, abstract, private :: derived320 end type derived321 22 !ERROR: Attributes 'PUBLIC' and 'PRIVATE' conflict with each other23 type, public, abstract, private :: derived424 end type derived425 26 !WARNING: Attribute 'BIND(C)' cannot be used more than once [-Wredundant-attribute]27 !WARNING: A derived type with the BIND attribute should not be empty [-Wempty-bind-c-derived-type]28 type, bind(c), public, bind(c) :: derived529 end type derived530 31 type, public :: derived632 end type derived633 34 !ERROR: Attribute 'EXTENDS' cannot be used more than once35 type, extends(derived6), public, extends(derived6) :: derived736 end type derived737 38end module m39