Skip to content

Commit b73c6c7

Browse files
[flang] Fix pause-statement testcase
Remove hlfir and add an additional check for hlfir.declare
1 parent cd29c0e commit b73c6c7

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
! RUN: bbc %s -emit-fir -hlfir=false --canonicalize -o - | FileCheck %s
1+
! RUN: bbc %s -emit-fir --canonicalize -o - | FileCheck %s
22

33
! CHECK-LABEL: pause_test
44
subroutine pause_test()
55
pause
6-
! CHECK: fir.call @_Fortran{{.*}}PauseStatement()
6+
! CHECK: fir.call @_FortranA{{.*}}PauseStatement()
77
! CHECK-NEXT: return
88
end subroutine
99

1010
! CHECK-LABEL: pause_code
1111
subroutine pause_code()
1212
pause 42
1313
! CHECK: %[[c42:.*]] = arith.constant 42 : i32
14-
! CHECK: fir.call @_Fortran{{.*}}PauseStatementInt(%[[c42]])
14+
! CHECK: fir.call @_FortranA{{.*}}PauseStatementInt(%[[c42]])
1515
! CHECK-NEXT: return
1616
end subroutine
1717

1818
! CHECK-LABEL: pause_msg
1919
subroutine pause_msg()
20-
pause 'hello'
20+
pause "hello"
2121
! CHECK-DAG: %[[five:.*]] = arith.constant 5 : index
22-
! CHECK-DAG: %[[lit:.*]] = fir.address_of(@_QQ{{.*}}) : !fir.ref<!fir.char<1,5>>
23-
! CHECK-DAG: %[[buff:.*]] = fir.convert %[[lit]] : (!fir.ref<!fir.char<1,5>>) -> !fir.ref<i8>
22+
! CHECK-DAG: %[[addr:.*]] = fir.address_of(@_QQ{{.*}}) : !fir.ref<!fir.char<1,5>>
23+
! CHECK-DAG: %[[str:.*]]:2 = hlfir.declare %[[addr]] typeparams %[[five]] {fortran_attrs = #fir.var_attrs<parameter>, uniq_name = "_QQ{{.*}}"} : (!fir.ref<!fir.char<1,5>>, index) -> (!fir.ref<!fir.char<1,5>>, !fir.ref<!fir.char<1,5>>)
24+
! CHECK-DAG: %[[buff:.*]] = fir.convert %[[str]]#0 : (!fir.ref<!fir.char<1,5>>) -> !fir.ref<i8>
2425
! CHECK-DAG: %[[len:.*]] = fir.convert %[[five]] : (index) -> i64
25-
! CHECK: fir.call @_Fortran{{.*}}PauseStatementText(%[[buff]], %[[len]])
26+
! CHECK: fir.call @_FortranA{{.*}}PauseStatementText(%[[buff]], %[[len]])
2627
! CHECK-NEXT: return
2728
end subroutine
2829

29-
! CHECK-DAG: func private @_Fortran{{.*}}PauseStatement
30-
! CHECK-DAG: func private @_Fortran{{.*}}PauseStatementInt
31-
! CHECK-DAG: func private @_Fortran{{.*}}PauseStatementText
30+
! CHECK-DAG: func private @_FortranA{{.*}}PauseStatement
31+
! CHECK-DAG: func private @_FortranA{{.*}}PauseStatementInt
32+
! CHECK-DAG: func private @_FortranA{{.*}}PauseStatementText

0 commit comments

Comments
 (0)