[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / data02.f90
blobeb4d801f6972acc4df6a826f11b9b6bb6b76d0bc
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Check that expressions are analyzed in data statements
5 subroutine s1
6 type :: t
7 character(1) :: c
8 end type
9 type(t) :: x
10 !ERROR: Value in structure constructor of type INTEGER(4) is incompatible with component 'c' of type CHARACTER(KIND=1,LEN=1_8)
11 data x /t(1)/
12 end
14 subroutine s2
15 real :: x1, x2
16 integer :: i1, i2
17 !ERROR: Unsupported REAL(KIND=99)
18 data x1 /1.0_99/
19 !ERROR: Unsupported REAL(KIND=99)
20 data x2 /-1.0_99/
21 !ERROR: INTEGER(KIND=99) is not a supported type
22 data i1 /1_99/
23 !ERROR: INTEGER(KIND=99) is not a supported type
24 data i2 /-1_99/
25 end
27 subroutine s3
28 complex :: z1, z2
29 !ERROR: Unsupported REAL(KIND=99)
30 data z1 /(1.0, 2.0_99)/
31 !ERROR: Unsupported REAL(KIND=99)
32 data z2 /-(1.0, 2.0_99)/
33 end