Fix flang MLIR unit test verification failures

- Eliminate public function declarations in these tests
This commit is contained in:
Rahul Joshi 2020-11-16 17:31:11 -08:00
parent 0f41a2fe83
commit ba3317d0ba
2 changed files with 86 additions and 86 deletions

View File

@ -3,35 +3,35 @@
// RUN: tco -emit-fir %s | tco -emit-fir | FileCheck %s
// UNSUPPORTED: !fir
// CHECK-LABEL: func @it1() -> !fir.int<4>
// CHECK: func @box1() -> !fir.boxchar<2>
// CHECK: func @box2() -> !fir.boxproc<(i32, i32) -> i64>
// CHECK: func @box3() -> !fir.box<!fir.type<derived3{f:f32}>>
func @it1() -> !fir.int<4>
func @box1() -> !fir.boxchar<2>
func @box2() -> !fir.boxproc<(i32, i32) -> i64>
func @box3() -> !fir.box<!fir.type<derived3{f:f32}>>
// CHECK-LABEL: func private @it1() -> !fir.int<4>
// CHECK: func private @box1() -> !fir.boxchar<2>
// CHECK: func private @box2() -> !fir.boxproc<(i32, i32) -> i64>
// CHECK: func private @box3() -> !fir.box<!fir.type<derived3{f:f32}>>
func private @it1() -> !fir.int<4>
func private @box1() -> !fir.boxchar<2>
func private @box2() -> !fir.boxproc<(i32, i32) -> i64>
func private @box3() -> !fir.box<!fir.type<derived3{f:f32}>>
// Fortran SUBROUTINE and FUNCTION
// CHECK-LABEL: func @print_index3(index, index, index)
// CHECK: func @user_i64(i64)
// CHECK: func @user_tdesc(!fir.tdesc<!fir.type<x>>)
func @print_index3(index, index, index)
func @user_i64(i64)
func @user_tdesc(!fir.tdesc<!fir.type<x>>)
// CHECK-LABEL: func private @print_index3(index, index, index)
// CHECK: func private @user_i64(i64)
// CHECK: func private @user_tdesc(!fir.tdesc<!fir.type<x>>)
func private @print_index3(index, index, index)
func private @user_i64(i64)
func private @user_tdesc(!fir.tdesc<!fir.type<x>>)
// expect the void return to be omitted
// CHECK-LABEL: func @store_tuple(tuple<!fir.type<qq1{f1:i32}>>)
// CHECK: func @get_method_box() -> !fir.box<!fir.type<derived3{f:f32}>>
// CHECK: func @method_impl(!fir.box<!fir.type<derived3{f:f32}>>)
func @store_tuple(tuple<!fir.type<qq1{f1:i32}>>) -> ()
func @get_method_box() -> !fir.box<!fir.type<derived3{f:f32}>>
func @method_impl(!fir.box<!fir.type<derived3{f:f32}>>)
// CHECK-LABEL: func private @store_tuple(tuple<!fir.type<qq1{f1:i32}>>)
// CHECK: func private @get_method_box() -> !fir.box<!fir.type<derived3{f:f32}>>
// CHECK: func private @method_impl(!fir.box<!fir.type<derived3{f:f32}>>)
func private @store_tuple(tuple<!fir.type<qq1{f1:i32}>>) -> ()
func private @get_method_box() -> !fir.box<!fir.type<derived3{f:f32}>>
func private @method_impl(!fir.box<!fir.type<derived3{f:f32}>>)
// CHECK-LABEL: func @nop()
// CHECK-LABEL: func @get_func() -> (() -> ())
func @nop()
func @get_func() -> (() -> ())
func private @nop()
func private @get_func() -> (() -> ())
// CHECK-LABEL: func @instructions() {
func @instructions() {
@ -581,8 +581,8 @@ func @character_literal() -> !fir.array<13 x !fir.char<1>> {
// CHECK: }
}
// CHECK-LABEL: func @earlyexit2(i32) -> i1
func @earlyexit2(%a : i32) -> i1
// CHECK-LABEL: func private @earlyexit2(i32) -> i1
func private @earlyexit2(%a : i32) -> i1
// CHECK-LABEL: func @early_exit(
// CHECK-SAME: [[VAL_186:%.*]]: i1, [[VAL_187:%.*]]: i32) -> i1 {

View File

@ -4,75 +4,75 @@
// UNSUPPORTED: !fir
// Fortran Intrinsic types
// CHECK-LABEL: func @it1() -> !fir.int<4>
// CHECK-LABEL: func @it2() -> !fir.real<8>
// CHECK-LABEL: func @it3() -> !fir.complex<8>
// CHECK-LABEL: func @it4() -> !fir.logical<1>
// CHECK-LABEL: func @it5() -> !fir.char<1>
func @it1() -> !fir.int<4>
func @it2() -> !fir.real<8>
func @it3() -> !fir.complex<8>
func @it4() -> !fir.logical<1>
func @it5() -> !fir.char<1>
// CHECK-LABEL: func private @it1() -> !fir.int<4>
// CHECK-LABEL: func private @it2() -> !fir.real<8>
// CHECK-LABEL: func private @it3() -> !fir.complex<8>
// CHECK-LABEL: func private @it4() -> !fir.logical<1>
// CHECK-LABEL: func private @it5() -> !fir.char<1>
func private @it1() -> !fir.int<4>
func private @it2() -> !fir.real<8>
func private @it3() -> !fir.complex<8>
func private @it4() -> !fir.logical<1>
func private @it5() -> !fir.char<1>
// Fortran Derived types (records)
// CHECK-LABEL: func @dvd1() -> !fir.type<derived1>
// CHECK-LABEL: func @dvd2() -> !fir.type<derived2(p:i32)>
// CHECK-LABEL: func @dvd3() -> !fir.type<derived3{f:f32}>
// CHECK-LABEL: func @dvd4() -> !fir.type<derived4(p:i8){f:f32}>
// CHECK-LABEL: func @dvd5() -> !fir.type<derived5(p1:i8,p2:i8,p3:i8,p4:i8,p5:i8){f1:f32,f2:f32,f3:f32,f4:f32,f5:f32,f6:f32,f7:f32,f8:f32}>
// CHECK-LABEL: func @dvd6() -> !fir.type<derived6{f:!fir.ptr<!fir.type<derived6>>}>
func @dvd1() -> !fir.type<derived1>
func @dvd2() -> !fir.type<derived2(p:i32)>
func @dvd3() -> !fir.type<derived3{f:f32}>
func @dvd4() -> !fir.type<derived4(p:i8){f:f32}>
func @dvd5() -> !fir.type<derived5(p1:i8,p2:i8,p3:i8,p4:i8,p5:i8){f1:f32,f2:f32,f3:f32,f4:f32,f5:f32,f6:f32,f7:f32,f8:f32}>
func @dvd6() -> !fir.type<derived6{f:!fir.ptr<!fir.type<derived6>>}>
// CHECK-LABEL: func private @dvd1() -> !fir.type<derived1>
// CHECK-LABEL: func private @dvd2() -> !fir.type<derived2(p:i32)>
// CHECK-LABEL: func private @dvd3() -> !fir.type<derived3{f:f32}>
// CHECK-LABEL: func private @dvd4() -> !fir.type<derived4(p:i8){f:f32}>
// CHECK-LABEL: func private @dvd5() -> !fir.type<derived5(p1:i8,p2:i8,p3:i8,p4:i8,p5:i8){f1:f32,f2:f32,f3:f32,f4:f32,f5:f32,f6:f32,f7:f32,f8:f32}>
// CHECK-LABEL: func private @dvd6() -> !fir.type<derived6{f:!fir.ptr<!fir.type<derived6>>}>
func private @dvd1() -> !fir.type<derived1>
func private @dvd2() -> !fir.type<derived2(p:i32)>
func private @dvd3() -> !fir.type<derived3{f:f32}>
func private @dvd4() -> !fir.type<derived4(p:i8){f:f32}>
func private @dvd5() -> !fir.type<derived5(p1:i8,p2:i8,p3:i8,p4:i8,p5:i8){f1:f32,f2:f32,f3:f32,f4:f32,f5:f32,f6:f32,f7:f32,f8:f32}>
func private @dvd6() -> !fir.type<derived6{f:!fir.ptr<!fir.type<derived6>>}>
// FIR array types
// CHECK-LABEL: func @arr1() -> !fir.array<10xf32>
// CHECK-LABEL: func @arr2() -> !fir.array<10x10xf32>
// CHECK-LABEL: func @arr3() -> !fir.array<?xf32>
// CHECK-LABEL: func @arr4() -> !fir.array<10x?xf32>
// CHECK-LABEL: func @arr5() -> !fir.array<?x?xf32>
// CHECK-LABEL: func @arr6() -> !fir.array<*:f32>
// CHECK-LABEL: func @arr7() -> !fir.array<1x2x?x4x5x6x7x8x9xf32>
func @arr1() -> !fir.array<10xf32>
func @arr2() -> !fir.array<10x10xf32>
func @arr3() -> !fir.array<?xf32>
func @arr4() -> !fir.array<10x?xf32>
func @arr5() -> !fir.array<?x?xf32>
func @arr6() -> !fir.array<*:f32>
func @arr7() -> !fir.array<1x2x?x4x5x6x7x8x9xf32>
// CHECK-LABEL: func private @arr1() -> !fir.array<10xf32>
// CHECK-LABEL: func private @arr2() -> !fir.array<10x10xf32>
// CHECK-LABEL: func private @arr3() -> !fir.array<?xf32>
// CHECK-LABEL: func private @arr4() -> !fir.array<10x?xf32>
// CHECK-LABEL: func private @arr5() -> !fir.array<?x?xf32>
// CHECK-LABEL: func private @arr6() -> !fir.array<*:f32>
// CHECK-LABEL: func private @arr7() -> !fir.array<1x2x?x4x5x6x7x8x9xf32>
func private @arr1() -> !fir.array<10xf32>
func private @arr2() -> !fir.array<10x10xf32>
func private @arr3() -> !fir.array<?xf32>
func private @arr4() -> !fir.array<10x?xf32>
func private @arr5() -> !fir.array<?x?xf32>
func private @arr6() -> !fir.array<*:f32>
func private @arr7() -> !fir.array<1x2x?x4x5x6x7x8x9xf32>
// FIR pointer-like types
// CHECK-LABEL: func @mem1() -> !fir.ref<i32>
// CHECK-LABEL: func @mem2() -> !fir.ptr<i32>
// CHECK-LABEL: func @mem3() -> !fir.heap<i32>
// CHECK-LABEL: func @mem4() -> !fir.ref<() -> ()>
func @mem1() -> !fir.ref<i32>
func @mem2() -> !fir.ptr<i32>
func @mem3() -> !fir.heap<i32>
func @mem4() -> !fir.ref<() -> ()>
// CHECK-LABEL: func private @mem1() -> !fir.ref<i32>
// CHECK-LABEL: func private @mem2() -> !fir.ptr<i32>
// CHECK-LABEL: func private @mem3() -> !fir.heap<i32>
// CHECK-LABEL: func private @mem4() -> !fir.ref<() -> ()>
func private @mem1() -> !fir.ref<i32>
func private @mem2() -> !fir.ptr<i32>
func private @mem3() -> !fir.heap<i32>
func private @mem4() -> !fir.ref<() -> ()>
// FIR box types (descriptors)
// CHECK-LABEL: func @box1() -> !fir.box<!fir.array<?xf32>>
// CHECK-LABEL: func @box2() -> !fir.boxchar<2>
// CHECK-LABEL: func @box3() -> !fir.boxproc<(i32, i32) -> i64>
// CHECK-LABEL: func @box4() -> !fir.box<none>
// CHECK-LABEL: func @box5() -> !fir.box<!fir.type<derived3{f:f32}>>
func @box1() -> !fir.box<!fir.array<?xf32>>
func @box2() -> !fir.boxchar<2>
func @box3() -> !fir.boxproc<(i32, i32) -> i64>
func @box4() -> !fir.box<none>
func @box5() -> !fir.box<!fir.type<derived3{f:f32}>>
// CHECK-LABEL: func private @box1() -> !fir.box<!fir.array<?xf32>>
// CHECK-LABEL: func private @box2() -> !fir.boxchar<2>
// CHECK-LABEL: func private @box3() -> !fir.boxproc<(i32, i32) -> i64>
// CHECK-LABEL: func private @box4() -> !fir.box<none>
// CHECK-LABEL: func private @box5() -> !fir.box<!fir.type<derived3{f:f32}>>
func private @box1() -> !fir.box<!fir.array<?xf32>>
func private @box2() -> !fir.boxchar<2>
func private @box3() -> !fir.boxproc<(i32, i32) -> i64>
func private @box4() -> !fir.box<none>
func private @box5() -> !fir.box<!fir.type<derived3{f:f32}>>
// FIR misc. types
// CHECK-LABEL: func @oth1() -> !fir.dims<1>
// CHECK-LABEL: func @oth2() -> !fir.field
// CHECK-LABEL: func @oth3() -> !fir.tdesc<!fir.type<derived7{f1:f32,f2:f32}>>
// CHECK-LABEL: func @oth4() -> !fir.dims<15>
func @oth1() -> !fir.dims<1>
func @oth2() -> !fir.field
func @oth3() -> !fir.tdesc<!fir.type<derived7{f1:f32,f2:f32}>>
func @oth4() -> !fir.dims<15>
// CHECK-LABEL: func private @oth1() -> !fir.dims<1>
// CHECK-LABEL: func private @oth2() -> !fir.field
// CHECK-LABEL: func private @oth3() -> !fir.tdesc<!fir.type<derived7{f1:f32,f2:f32}>>
// CHECK-LABEL: func private @oth4() -> !fir.dims<15>
func private @oth1() -> !fir.dims<1>
func private @oth2() -> !fir.field
func private @oth3() -> !fir.tdesc<!fir.type<derived7{f1:f32,f2:f32}>>
func private @oth4() -> !fir.dims<15>