1 ! RUN: bbc %s -o - | tco | FileCheck %s
2 ! RUN: %flang -emit-llvm -S -mmlir -disable-external-name-interop %s -o - | FileCheck %s
4 ! CHECK: @_QC = common global [8 x i8] zeroinitializer
5 ! CHECK: @_QCrien = common global [1 x i8] zeroinitializer
6 ! CHECK: @_QCwith_empty_equiv = common global [8 x i8] zeroinitializer
7 ! CHECK: @_QCx = global { float, float } { float 1.0{{.*}}, float 2.0{{.*}} }
8 ! CHECK: @_QCy = common global [12 x i8] zeroinitializer
9 ! CHECK: @_QCz = global { i32, [4 x i8], float } { i32 42, [4 x i8] undef, float 3.000000e+00 }
15 ! CHECK: call void @_QPs(ptr @_QC, ptr getelementptr (i8, ptr @_QC, i64 4))
22 data a1
/1.0/, b1
/2.0/
24 ! CHECK: call void @_QPs(ptr @_QCx, ptr getelementptr (i8, ptr @_QCx, i64 4))
32 ! CHECK: call void @_QPs(ptr @_QCy, ptr getelementptr (i8, ptr @_QCy, i64 4))
36 ! Test that common initialized through aliases of common members are getting
37 ! the correct initializer.
45 equivalence (i
, x
), (glue(1), c
), (glue(2), y
)
46 ! x and c are not directly initialized, but overlapping aliases are.
50 module mod_with_common
52 common /c_in_mod
/ i
, j
57 ! CHECK: load i32, ptr @_QCc_in_mod
59 ! CHECK: load i32, ptr getelementptr (i8, ptr @_QCc_in_mod, i64 4)
71 real r1(1:0), r2(1:0), x
, y
72 common /with_empty_equiv
/ x
, r1
, y