[flang-commits] [flang] [flang][AArch64] Pass large BIND(C) VALUE derived types indirectly (PR #215508)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Wed Aug 12 10:47:04 PDT 2026


================
@@ -0,0 +1,30 @@
+/// Test the AArch64 ABI rewrite of a BIND(C), VALUE derived type argument that
+/// is larger than 16 bytes. Such an argument is passed as a pointer to a copy
+/// made by the caller, and is not marked byval.
+
+// RUN: fir-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+
+!big = !fir.type<big{i:!fir.array<128x!fir.char<1>>}>
+
+/// The callee receives a pointer and loads the value from it.
+// CHECK-LABEL: func.func @callee(
+// CHECK-SAME:      %[[ARG:.*]]: !fir.ref<!fir.type<big{i:!fir.array<128x!fir.char<1>>}>> {llvm.align = 1 : i32}) {
----------------
ergawy wrote:

Thanks for the review. Done in f2c171049a8c5cfac581346b0814a7c4ef16af9e.

https://github.com/llvm/llvm-project/pull/215508


More information about the flang-commits mailing list