[flang-commits] [flang] [flang] Update a test case for AIX (NFC) (PR #201865)

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Fri Jun 5 10:53:58 PDT 2026


https://github.com/kkwli updated https://github.com/llvm/llvm-project/pull/201865

>From e7cd034268cb4cf2bf84c8cbea1086968734e25c Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Fri, 5 Jun 2026 11:37:22 -0400
Subject: [PATCH 1/2] [flang] Update a test case for AIX (NFC)

-fdata-sections is specified by default on AIX. This
patch is to adjust the testing for the case that the option
is off and on by default.
---
 flang/test/Driver/function-sections.f90 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/flang/test/Driver/function-sections.f90 b/flang/test/Driver/function-sections.f90
index 7072d62a9d3e2..b40d2cbda11c0 100644
--- a/flang/test/Driver/function-sections.f90
+++ b/flang/test/Driver/function-sections.f90
@@ -5,9 +5,12 @@
 ! CHECK-DS: "-fdata-sections"
 ! CHECK-NODS-NOT: "-fdata-sections"
 
-! RUN: %flang -### %s 2>&1 \
+! RUN: %flang -### -target x86_64-none-linux-gnu %s 2>&1 \
 ! RUN:   | FileCheck %s --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS
 
+! RUN: %flang -### -target powerpc64-ibm-aix-xcoff %s 2>&1 \
+! RUN:   | FileCheck %s --check-prefix=CHECK-NOFS
+
 ! RUN: %flang -### %s -ffunction-sections 2>&1 \
 ! RUN:   | FileCheck %s --check-prefix=CHECK-FS
 

>From 4ecd84d458bea90ce55da42bf1de52b4bd422b52 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Fri, 5 Jun 2026 13:52:52 -0400
Subject: [PATCH 2/2] Add test for aarch64-unknown-linux-gnu

---
 flang/test/Driver/function-sections.f90 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/flang/test/Driver/function-sections.f90 b/flang/test/Driver/function-sections.f90
index b40d2cbda11c0..7cd0490633cc2 100644
--- a/flang/test/Driver/function-sections.f90
+++ b/flang/test/Driver/function-sections.f90
@@ -8,6 +8,9 @@
 ! RUN: %flang -### -target x86_64-none-linux-gnu %s 2>&1 \
 ! RUN:   | FileCheck %s --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS
 
+! RUN: %flang -### -target aarch64-unknown-linux-gnu %s 2>&1 \
+! RUN:   | FileCheck %s --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS
+
 ! RUN: %flang -### -target powerpc64-ibm-aix-xcoff %s 2>&1 \
 ! RUN:   | FileCheck %s --check-prefix=CHECK-NOFS
 



More information about the flang-commits mailing list