Index: flang/test/Fir/types-to-llvm.fir =================================================================== --- flang/test/Fir/types-to-llvm.fir +++ flang/test/Fir/types-to-llvm.fir @@ -4,10 +4,11 @@ // Test sequence types `!fir.array` +// Note that we're switching from column-major to row-major here. -func private @foo0(%arg0: !fir.array<10x10xi64>) +func private @foo0(%arg0: !fir.array<10x12xi64>) // CHECK-LABEL: foo0 -// CHECK-SAME: !llvm.array<10 x array<10 x i64>> +// CHECK-SAME: !llvm.array<12 x array<10 x i64>> func private @foo1(%arg0: !fir.array) // CHECK-LABEL: foo1 // CHECK-SAME: !llvm.ptr @@ -17,6 +18,21 @@ func private @foo3(%arg0: !fir.array<*:i32>) // CHECK-LABEL: foo3 // CHECK-SAME: !llvm.ptr +func private @foo4(%arg0: !fir.array<3x?xi32>) +// CHECK-LABEL: foo4 +// CHECK-SAME: !llvm.ptr> +func private @foo5(%arg0: !fir.array) +// CHECK-LABEL: foo5 +// CHECK-SAME: !llvm.ptr +func private @foo6(%arg0: !fir.array<2x?x3x?x4xi32>) +// CHECK-LABEL: foo6 +// CHECK-SAME: !llvm.ptr +func private @foo7(%arg0: !fir.array<6x?x!fir.char<1,?>>) +// CHECK-LABEL: foo7 +// CHECK-SAME: !llvm.ptr +func private @foo8(%arg0: !fir.array<6x?x!fir.char<1,3>>) +// CHECK-LABEL: foo8 +// CHECK-SAME: !llvm.ptr // ----- @@ -31,6 +47,21 @@ func private @foo2(%arg0: !fir.ref>>>) // CHECK-LABEL: foo2 // CHECK-SAME: !llvm.ptr>, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, ptr, array<1 x i{{.*}}>)>> +func private @foo3(%arg0: !fir.ref>) +// CHECK-LABEL: foo3 +// CHECK-SAME: !llvm.ptr +func private @foo4(%arg0: !fir.ref>) +// CHECK-LABEL: foo4 +// CHECK-SAME: !llvm.ptr>> +func private @foo5(%arg0: !fir.ref>>) +// CHECK-LABEL: foo5 +// CHECK-SAME: !llvm.ptr +func private @foo6(%arg0: !fir.ref>>) +// CHECK-LABEL: foo6 +// CHECK-SAME: !llvm.ptr +func private @foo7(%arg0: !fir.ref>>) +// CHECK-LABEL: foo7 +// CHECK-SAME: !llvm.ptr, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, i{{.*}}, array<1 x array<3 x i{{.*}}>>)>> // -----