[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / data02.f90
blobe98343f8aea23d026c70459dd8b4694ed70e5dc7
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check that expressions are analyzed in data statements
4 subroutine s1
5 type :: t
6 character(1) :: c
7 end type
8 type(t) :: x
9 !ERROR: Value in structure constructor of type 'INTEGER(4)' is incompatible with component 'c' of type 'CHARACTER(KIND=1,LEN=1_8)'
10 data x /t(1)/
11 end
13 subroutine s2
14 real :: x1, x2
15 integer :: i1, i2
16 !ERROR: Unsupported REAL(KIND=99)
17 data x1 /1.0_99/
18 !ERROR: Unsupported REAL(KIND=99)
19 data x2 /-1.0_99/
20 !ERROR: INTEGER(KIND=99) is not a supported type
21 data i1 /1_99/
22 !ERROR: INTEGER(KIND=99) is not a supported type
23 data i2 /-1_99/
24 end
26 subroutine s3
27 complex :: z1, z2
28 !ERROR: Unsupported REAL(KIND=99)
29 data z1 /(1.0, 2.0_99)/
30 !ERROR: Unsupported REAL(KIND=99)
31 data z2 /-(1.0, 2.0_99)/
32 end