[flang-commits] [flang] 6518c40 - [flang] Add test for quiet with local variable in STOP stmt

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Mon Feb 7 00:17:39 PST 2022


Author: Valentin Clement
Date: 2022-02-07T09:17:28+01:00
New Revision: 6518c40931e38f943029d060dcc2f69c77e7f1cb

URL: https://github.com/llvm/llvm-project/commit/6518c40931e38f943029d060dcc2f69c77e7f1cb
DIFF: https://github.com/llvm/llvm-project/commit/6518c40931e38f943029d060dcc2f69c77e7f1cb.diff

LOG: [flang] Add test for quiet with local variable in STOP stmt

Depends on D118978.

Differential Revision: https://reviews.llvm.org/D118982

Added: 
    

Modified: 
    flang/test/Lower/stop-statement.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Lower/stop-statement.f90 b/flang/test/Lower/stop-statement.f90
index e077b130aa8cf..d90e514bdc361 100644
--- a/flang/test/Lower/stop-statement.f90
+++ b/flang/test/Lower/stop-statement.f90
@@ -38,3 +38,16 @@ subroutine stop_quiet_constant()
  ! CHECK: fir.call @_Fortran{{.*}}StopStatement(%[[c0]], %[[false]], %[[true]])
  ! CHECK-NEXT: fir.unreachable
 end subroutine
+
+! CHECK-LABEL stop_quiet
+subroutine stop_quiet()
+  logical :: b
+  stop, quiet = b
+ ! CHECK-DAG: %[[c0:.*]] = arith.constant 0 : i32
+ ! CHECK-DAG: %[[false:.*]] = arith.constant false
+ ! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.logical<4> {bindc_name = "b", uniq_name = "_QFstop_quietEb"}
+ ! CHECK: %[[b:.*]] = fir.load %[[ALLOCA]]
+ ! CHECK: %[[bi1:.*]] = fir.convert %[[b]] : (!fir.logical<4>) -> i1
+ ! CHECK: fir.call @_Fortran{{.*}}StopStatement(%[[c0]], %[[false]], %[[bi1]])
+ ! CHECK-NEXT: fir.unreachable
+end subroutine


        


More information about the flang-commits mailing list