[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve90.f90
blobc0aa420e59eb2392904b90db1a0ac1a72210d6a2
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Testing for pointer constant, along with :
4 ! C751 A component shall not have both the ALLOCATABLE and POINTER attributes.
5 ! C752 If the CONTIGUOUS attribute is specified, the component shall be an
6 ! array with the POINTER attribute.
7 ! C753 The * char-length option is permitted only if the component is of type
8 ! character.
9 subroutine s()
10 !ERROR: 'nullint' may not have both the POINTER and PARAMETER attributes
11 integer, pointer, parameter :: nullint => null()
12 type derivedType
13 !ERROR: 'pointerallocatablefield' may not have both the POINTER and ALLOCATABLE attributes
14 real, pointer, allocatable :: pointerAllocatableField
15 real, dimension(:), contiguous, pointer :: goodContigField
16 !ERROR: A CONTIGUOUS component must be an array with the POINTER attribute
17 real, dimension(:), contiguous, allocatable :: badContigField
18 character :: charField * 3
19 !ERROR: A length specifier cannot be used to declare the non-character entity 'realfield'
20 real :: realField * 3
21 end type derivedType
22 end subroutine s