[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / resolve30.f90
blobc594cceef15b1fc3e0cb50afc545707fd12de216
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 subroutine s1
3 integer x
4 block
5 import, none
6 !ERROR: 'x' from host scoping unit is not accessible due to IMPORT
7 x = 1
8 end block
9 end
11 subroutine s2
12 block
13 import, none
14 !ERROR: 'y' from host scoping unit is not accessible due to IMPORT
15 y = 1
16 end block
17 end
19 subroutine s3
20 implicit none
21 integer :: i, j
22 block
23 import, none
24 !ERROR: No explicit type declared for 'i'
25 real :: a(16) = [(i, i=1, 16)]
26 real :: b(16)
27 !ERROR: No explicit type declared for 'j'
28 data(b(j), j=1, 16) / 16 * 0.0 /
29 end block
30 end
32 subroutine s4
33 real :: j
34 !ERROR: Must have INTEGER type, but is REAL(4)
35 real :: a(16) = [(x, x=1, 16)]
36 real :: b(16)
37 !ERROR: Must have INTEGER type, but is REAL(4)
38 data(b(j), j=1, 16) / 16 * 0.0 /
39 end