[flang-commits] [flang] 03b4714 - [flang][NFC] Fix function-attr-readonly test on PowerPC (#209431)
via flang-commits
flang-commits at lists.llvm.org
Tue Jul 14 04:07:10 PDT 2026
Author: Sergey Shcherbinin
Date: 2026-07-14T16:37:06+05:30
New Revision: 03b4714611ab0aab34c7267e0946fb79bf40babe
URL: https://github.com/llvm/llvm-project/commit/03b4714611ab0aab34c7267e0946fb79bf40babe
DIFF: https://github.com/llvm/llvm-project/commit/03b4714611ab0aab34c7267e0946fb79bf40babe.diff
LOG: [flang][NFC] Fix function-attr-readonly test on PowerPC (#209431)
Follow-up fix for the newly added test, which was not exercised on all
targets. PowerPC adds llvm.target_features between the function argument
list and the body. Stop requiring the opening brace to immediately
follow the argument list so that the checks remain target-independent.
Added:
Modified:
flang/test/Driver/function-attr-readonly.f90
Removed:
################################################################################
diff --git a/flang/test/Driver/function-attr-readonly.f90 b/flang/test/Driver/function-attr-readonly.f90
index 0f7b1b0589a3c..120fa8f266da5 100644
--- a/flang/test/Driver/function-attr-readonly.f90
+++ b/flang/test/Driver/function-attr-readonly.f90
@@ -32,16 +32,16 @@ subroutine pointer_descriptor_readonly(p)
! O0-LABEL: func.func @_QMreadonly_pipeline_modPreadonly_pipeline(
! O0-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "x", fir.read_only, llvm.noalias},
-! O0-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "y", llvm.noalias}) {
+! O0-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "y", llvm.noalias})
! O1-LABEL: func.func @_QMreadonly_pipeline_modPreadonly_pipeline(
! O1-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "x", fir.read_only, llvm.noalias, llvm.nocapture, llvm.readonly},
-! O1-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "y", llvm.noalias, llvm.nocapture}) {
+! O1-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "y", llvm.noalias, llvm.nocapture})
! LLVM-LABEL: define void @_QMreadonly_pipeline_modPreadonly_pipeline(
! LLVM-SAME: ptr {{.*}}readonly{{.*}} %0,
-! O1-LABEL: func.func @_QMreadonly_pipeline_modPpointer_descriptor_readonly(%{{.*}}: !fir.ref<!fir.box<!fir.ptr<i32>>> {fir.bindc_name = "p", fir.read_only, llvm.nocapture, llvm.readonly}) {
+! O1-LABEL: func.func @_QMreadonly_pipeline_modPpointer_descriptor_readonly(%{{.*}}: !fir.ref<!fir.box<!fir.ptr<i32>>> {fir.bindc_name = "p", fir.read_only, llvm.nocapture, llvm.readonly})
! LLVM-LABEL: define void @_QMreadonly_pipeline_modPpointer_descriptor_readonly(
! LLVM-SAME: ptr {{.*}}readonly{{.*}} %0
More information about the flang-commits
mailing list