[flang-commits] [flang] [flang] Disable -gdwarf-5 tests on AIX. (PR #159533)
Abid Qadeer via flang-commits
flang-commits at lists.llvm.org
Fri Sep 19 03:25:04 PDT 2025
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/159533
>From c0d333ff7cde536e41c83b984b578ffb688e4f4c Mon Sep 17 00:00:00 2001
From: Abid Qadeer <haqadeer at amd.com>
Date: Thu, 18 Sep 2025 10:15:55 +0100
Subject: [PATCH 1/3] [flang] Disable -gdwarf-5 tests on AIX.
---
flang/test/Driver/flang-dwarf-version.f90 | 1 +
flang/test/Integration/debug-dwarf-flags.f90 | 1 +
2 files changed, 2 insertions(+)
diff --git a/flang/test/Driver/flang-dwarf-version.f90 b/flang/test/Driver/flang-dwarf-version.f90
index dc69140a7eda1..159130aaed98c 100644
--- a/flang/test/Driver/flang-dwarf-version.f90
+++ b/flang/test/Driver/flang-dwarf-version.f90
@@ -1,3 +1,4 @@
+// UNSUPPORTED: target={{.*}}-aix{{.*}}
// RUN: %flang -### -S %s -g -gdwarf-5 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s
// RUN: %flang -### -S %s -gdwarf-5 2>&1 \
diff --git a/flang/test/Integration/debug-dwarf-flags.f90 b/flang/test/Integration/debug-dwarf-flags.f90
index ac5b1c0d8d4b2..9de1dc8163653 100644
--- a/flang/test/Integration/debug-dwarf-flags.f90
+++ b/flang/test/Integration/debug-dwarf-flags.f90
@@ -1,3 +1,4 @@
+// UNSUPPORTED: target={{.*}}-aix{{.*}}
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone -dwarf-version=5 %s \
! RUN: -o - | FileCheck --check-prefix=CHECK-DWARF5 %s
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=line-tables-only -dwarf-version=5 \
>From d25ca7bf37df6b2874ea5c3f8a3b13b2ded52824 Mon Sep 17 00:00:00 2001
From: Abid Qadeer <haqadeer at amd.com>
Date: Thu, 18 Sep 2025 11:06:04 +0100
Subject: [PATCH 2/3] Use ! instead of //
---
flang/test/Integration/debug-dwarf-flags.f90 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/test/Integration/debug-dwarf-flags.f90 b/flang/test/Integration/debug-dwarf-flags.f90
index 9de1dc8163653..5dc3f9fe0042d 100644
--- a/flang/test/Integration/debug-dwarf-flags.f90
+++ b/flang/test/Integration/debug-dwarf-flags.f90
@@ -1,4 +1,4 @@
-// UNSUPPORTED: target={{.*}}-aix{{.*}}
+! UNSUPPORTED: target={{.*}}-aix{{.*}}
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone -dwarf-version=5 %s \
! RUN: -o - | FileCheck --check-prefix=CHECK-DWARF5 %s
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=line-tables-only -dwarf-version=5 \
>From ba70f0ed721a1eb3545dfd5599f491a37cbdfa79 Mon Sep 17 00:00:00 2001
From: Abid Qadeer <haqadeer at amd.com>
Date: Thu, 18 Sep 2025 17:10:11 +0100
Subject: [PATCH 3/3] Handle review comments.
Put the check for aix only around dwarf5 tests. This way rest of the tests run for aix too.
---
flang/test/Driver/flang-dwarf-version.f90 | 16 ++++++++++++----
flang/test/Integration/debug-dwarf-flags.f90 | 11 ++++++++---
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/flang/test/Driver/flang-dwarf-version.f90 b/flang/test/Driver/flang-dwarf-version.f90
index 159130aaed98c..d860c970a91f8 100644
--- a/flang/test/Driver/flang-dwarf-version.f90
+++ b/flang/test/Driver/flang-dwarf-version.f90
@@ -1,10 +1,18 @@
-// UNSUPPORTED: target={{.*}}-aix{{.*}}
+// RUN: %if !target={{.*aix.*}} %{ \
// RUN: %flang -### -S %s -g -gdwarf-5 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s
+// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s \
+// RUN: %}
+
+// RUN: %if !target={{.*aix.*}} %{ \
// RUN: %flang -### -S %s -gdwarf-5 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s
+// RUN: | FileCheck --check-prefix=CHECK-DWARF5 %s \
+// RUN: %}
+
+// RUN: %if !target={{.*aix.*}} %{ \
// RUN: %flang -### -S %s -g1 -gdwarf-5 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-WITH-G1-DWARF5 %s
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G1-DWARF5 %s \
+// RUN: %}
+
// RUN: %flang -### -S %s -gdwarf-4 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-DWARF4 %s
// RUN: %flang -### -S %s -gdwarf-3 2>&1 \
diff --git a/flang/test/Integration/debug-dwarf-flags.f90 b/flang/test/Integration/debug-dwarf-flags.f90
index 5dc3f9fe0042d..3307ef6f0a971 100644
--- a/flang/test/Integration/debug-dwarf-flags.f90
+++ b/flang/test/Integration/debug-dwarf-flags.f90
@@ -1,8 +1,13 @@
-! UNSUPPORTED: target={{.*}}-aix{{.*}}
+! RUN: %if !target={{.*aix.*}} %{ \
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone -dwarf-version=5 %s \
-! RUN: -o - | FileCheck --check-prefix=CHECK-DWARF5 %s
+! RUN: -o - | FileCheck --check-prefix=CHECK-DWARF5 %s \
+! RUN: %}
+
+! RUN: %if !target={{.*aix.*}} %{ \
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=line-tables-only -dwarf-version=5 \
-! RUN: %s -o - | FileCheck --check-prefix=CHECK-DWARF5 %s
+! RUN: %s -o - | FileCheck --check-prefix=CHECK-DWARF5 %s \
+! RUN: %}
+
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone -dwarf-version=4 %s \
! RUN: -o - | FileCheck --check-prefix=CHECK-DWARF4 %s
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone -dwarf-version=3 %s \
More information about the flang-commits
mailing list