1 ! REQUIRES: flang-supports-f128-math
2 ! RUN: bbc %s -o - | tco | FileCheck %s
3 ! RUN: %flang -emit-llvm -S -mmlir -disable-external-name-interop %s -o - | FileCheck %s
5 ! CHECK: @__BLNK__ = common global [8 x i8] zeroinitializer
6 ! CHECK: @co1_ = common global [16 x i8] zeroinitializer, align 16
7 ! CHECK: @rien_ = common global [1 x i8] zeroinitializer
8 ! CHECK: @with_empty_equiv_ = common global [8 x i8] zeroinitializer
9 ! CHECK: @x_ = global { float, float } { float 1.0{{.*}}, float 2.0{{.*}} }
10 ! CHECK: @y_ = common global [12 x i8] zeroinitializer
11 ! CHECK: @z_ = global { i32, [4 x i8], float } { i32 42, [4 x i8] zeroinitializer, float 3.000000e+00 }
17 ! CHECK: call void @_QPs(ptr @__BLNK__, ptr getelementptr (i8, ptr @__BLNK__, i64 4))
24 data a1
/1.0/, b1
/2.0/
26 ! CHECK: call void @_QPs(ptr @x_, ptr getelementptr (i8, ptr @x_, i64 4))
34 ! CHECK: call void @_QPs(ptr @y_, ptr getelementptr (i8, ptr @y_, i64 4))
38 ! Test that common initialized through aliases of common members are getting
39 ! the correct initializer.
47 equivalence (i
, x
), (glue(1), c
), (glue(2), y
)
48 ! x and c are not directly initialized, but overlapping aliases are.
52 module mod_with_common
54 common /c_in_mod
/ i
, j
59 ! CHECK: load i32, ptr @c_in_mod_
61 ! CHECK: load i32, ptr getelementptr (i8, ptr @c_in_mod_, i64 4)
73 real r1(1:0), r2(1:0), x
, y
74 common /with_empty_equiv
/ x
, r1
, y