[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / common-blocks.f90
blob89d9fb6e6af08c8bac1ce4e34118ceed93a3adac
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! Test check that enforce that a common block is initialized
4 ! only once in a file.
6 subroutine init_1
7 common x, y
8 common /a/ xa, ya
9 common /b/ xb, yb
10 !WARNING: Blank COMMON object 'x' in a DATA statement is not standard
11 data x /42./, xa /42./, yb/42./
12 end subroutine
14 subroutine init_conflict
15 !ERROR: Multiple initialization of COMMON block //
16 common x, y
17 !ERROR: Multiple initialization of COMMON block /a/
18 common /a/ xa, ya
19 common /b/ xb, yb
20 equivalence (yb, yb_eq)
21 !WARNING: Blank COMMON object 'x' in a DATA statement is not standard
22 !ERROR: Multiple initialization of COMMON block /b/
23 data x /66./, xa /66./, yb_eq /66./
24 end subroutine