[AMDGPU] Test codegen'ing True16 additions.
[llvm-project.git] / flang / test / Semantics / resolve85.f90
blobb85b7bb052dbc1f7eca87641253f44c900842a61
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 ! C730 The same type-attr-spec shall not appear more than once in a given
4 ! derived-type-stmt.
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
14 !WARNING: Attribute 'PUBLIC' cannot be used more than once
15 type, public, abstract, public :: derived2
16 end type derived2
18 !WARNING: Attribute 'PRIVATE' cannot be used more than once
19 type, private, abstract, private :: derived3
20 end type derived3
22 !ERROR: Attributes 'PUBLIC' and 'PRIVATE' conflict with each other
23 type, public, abstract, private :: derived4
24 end type derived4
26 !WARNING: Attribute 'BIND(C)' cannot be used more than once
27 !WARNING: A derived type with the BIND attribute is empty
28 type, bind(c), public, bind(c) :: derived5
29 end type derived5
31 type, public :: derived6
32 end type derived6
34 !ERROR: Attribute 'EXTENDS' cannot be used more than once
35 type, extends(derived6), public, extends(derived6) :: derived7
36 end type derived7
38 end module m