Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: gdb-patches@sourceware.org
Cc: Guinevere Larsen <guinevere@redhat.com>
Subject: [PATCH] gdb/testsuite: skip gdb.threads/omp-par-scope.exp with clang
Date: Mon, 25 Nov 2024 15:42:25 -0300	[thread overview]
Message-ID: <20241125184225.1021664-1-guinevere@redhat.com> (raw)

Since 2020 it has been reported to clang[1] that the debug information
around OpenMP is insufficient.  The OpenMP section is not declared
within the correct scope, and instead clang marks as if the section was
a function in the global scope.  This causes several failures in the
test gdb.threads/omp-par-scope.exp when using clang to test GDB.

Since this isn't a true failure of GDB, and there is little expectation
that clang will be able to fix this soon, this commit disables the
aforementioned test when clang is being used.

[1] https://github.com/llvm/llvm-project/issues/44236
---
 gdb/testsuite/gdb.threads/omp-par-scope.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.exp b/gdb/testsuite/gdb.threads/omp-par-scope.exp
index 38c462c421f..6d68afd404a 100644
--- a/gdb/testsuite/gdb.threads/omp-par-scope.exp
+++ b/gdb/testsuite/gdb.threads/omp-par-scope.exp
@@ -20,6 +20,14 @@
 
 standard_testfile
 
+if { [test_compiler_info "clang*"] } {
+    # Clang doesn't add OpenMP information in the correct scope,
+    # so all relevant tests here will fail.  See here for more info:
+    # https://github.com/llvm/llvm-project/issues/44236
+    unsupported "Clang doesn't add required info for the test"
+    return
+}
+
 set have_nested_function_support 0
 set opts {openmp debug}
 if [support_nested_function_tests] {
-- 
2.47.0


             reply	other threads:[~2024-11-25 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 18:42 Guinevere Larsen [this message]
2024-11-27 18:14 ` Kevin Buettner
2024-11-27 18:50   ` Guinevere Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241125184225.1021664-1-guinevere@redhat.com \
    --to=guinevere@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox