Skip to content

Commit ef47373

Browse files
committed
Adding T3
1 parent 13ded68 commit ef47373

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
@@ -47,6 +47,10 @@
4747
// CHECK-DAG: arg2.load#0 <-> arg2.addr#0: MustAlias
4848
// CHECK-DAG: boxp1.addr#0 <-> arg2.addr#0: MayAlias
4949

50+
// TODO: Can the address in a pointer alias the address of a pointer, even when the
51+
// pointer has no box.
52+
// T3: CHECK-DAG: p1.addr#0 <-> p1.tgt#0: MayAlias
53+
5054
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"} {
5155

5256
%1 = fir.alloca !fir.ptr<f32> {test.ptr = "p1.addr"}
@@ -63,7 +67,7 @@ func.func @_QFPtest(%arg0: !fir.ref<f32> {fir.bindc_name = "v1", fir.target}, %a
6367
fir.store %6 to %4 : !fir.ref<!fir.ptr<f32>>
6468

6569
%0 = fir.alloca !fir.box<!fir.ptr<f32>> {bindc_name = "p1", uniq_name = "_QFtestEp1"}
66-
%7 = fir.load %1 : !fir.ref<!fir.ptr<f32>>
70+
%7 = fir.load %1 {test.ptr="p1.tgt"} : !fir.ref<!fir.ptr<f32>>
6771
%8 = fir.embox %7 : (!fir.ptr<f32>) -> !fir.box<!fir.ptr<f32>>
6872
fir.store %8 to %0 : !fir.ref<!fir.box<!fir.ptr<f32>>>
6973

0 commit comments

Comments
 (0)