[flang-commits] [PATCH] D139151: [flang] Fold the RHS of assignment

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Dec 2 00:15:24 PST 2022


jeanPerier added inline comments.


================
Comment at: flang/test/Lower/array-temp.f90:121-123
+! CHECK:   %[[V_47:[0-9]+]] = fir.address_of(@_QQcl.fadbffaaa3c9e6b8d39d58c0e68d8712) : !fir.ref<!fir.char<1,52>>
+! CHECK:   %[[V_48:[0-9]+]] = fir.convert %[[V_47:[0-9]+]] : (!fir.ref<!fir.char<1,52>>) -> !fir.ref<i8>
+! CHECK:   %[[V_49:[0-9]+]] = fir.call @_FortranAioBeginExternalListOutput(%[[C_m1_i32]], %[[V_48]], %[[C_27_i32]]) fastmath<contract> : (i32, !fir.ref<i8>, i32) -> !fir.ref<i8>
----------------
Regression test are failing. This is because the test update is now testing for something that is environment dependent: the path name of the current file. 

You will need to remove the checks from: `! CHECK:   %[[V_47:[0-9]+]] = fir.address_of ...` to `%[[V_49:[0-9]+]] ...` and replace that last one by:
`%[[V_49:[0-9]+]] = fir.call @_FortranAioBeginExternalListOutput(%[[C_m1_i32]]], %{{.*}}, %{{.*}}) {{.*}}: (i32, !fir.ref<i8>, i32) -> !fir.ref<i8>`

You will need to do the same for all _FortranAioBeginExternalListOutput calls (in general, this needs to be done on every runtime call that takes the file name as argument).

This test is in general checking for way too much... sorry about the trouble this is causing you. New lowering test should be more focus on what they are testing.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139151/new/

https://reviews.llvm.org/D139151



More information about the flang-commits mailing list