Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve78.f90
blob8c25f32e80cdccc607fd9027b56d21d6c6f73943
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 ! C743 No component-attr-spec shall appear more than once in a
4 ! given component-def-stmt.
6 ! R737 data-component-def-stmt ->
7 ! declaration-type-spec [[, component-attr-spec-list] ::]
8 ! component-decl-list
9 ! component-attr-spec values are:
10 ! PUBLIC, PRIVATE, ALLOCATABLE, CODIMENSION [*], CONTIGUOUS, DIMENSION(5),
11 ! POINTER
13 type :: derived
14 !WARNING: Attribute 'PUBLIC' cannot be used more than once
15 real, public, allocatable, public :: field1
16 !WARNING: Attribute 'PRIVATE' cannot be used more than once
17 real, private, allocatable, private :: field2
18 !ERROR: Attributes 'PUBLIC' and 'PRIVATE' conflict with each other
19 real, public, allocatable, private :: field3
20 !WARNING: Attribute 'ALLOCATABLE' cannot be used more than once
21 real, allocatable, public, allocatable :: field4
22 !ERROR: Attribute 'CODIMENSION' cannot be used more than once
23 real, public, codimension[:], allocatable, codimension[:] :: field5
24 !WARNING: Attribute 'CONTIGUOUS' cannot be used more than once
25 real, public, contiguous, pointer, contiguous, dimension(:) :: field6
26 !ERROR: Attribute 'DIMENSION' cannot be used more than once
27 real, dimension(5), public, dimension(5) :: field7
28 !WARNING: Attribute 'POINTER' cannot be used more than once
29 real, pointer, public, pointer :: field8
30 end type derived
32 end module m