Skip to content

Commit c67aa1f

Browse files
committed
Added T4
1 parent ef47373 commit c67aa1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flang/test/Analysis/AliasAnalysis/alias-analysis-2.fir

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@
4848
// CHECK-DAG: boxp1.addr#0 <-> arg2.addr#0: MayAlias
4949

5050
// TODO: Can the address in a pointer alias the address of a pointer, even when the
51-
// pointer has no box.
51+
// pointer has no box. Should this be NoAlias?
5252
// T3: CHECK-DAG: p1.addr#0 <-> p1.tgt#0: MayAlias
5353

54+
// The addresses stored in two different pointers can alias, even if one has no
55+
// box. In this program, they happen to be the same address.
56+
// T4: CHECK-DAG: p1.tgt#0 <-> boxp1.addr#0: MayAlias
57+
5458
func.func @_QFPtest(%arg0: !fir.ref<f32> {fir.bindc_name = "v1", fir.target}, %arg1: !fir.ref<f32> {fir.bindc_name = "v2", fir.target}, %arg2: !fir.ref<!fir.box<!fir.ptr<f32>>> ) attributes {test.ptr = "func"} {
5559

5660
%1 = fir.alloca !fir.ptr<f32> {test.ptr = "p1.addr"}

0 commit comments

Comments
 (0)