public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 3/4] [gdb/testsuite] Require gcc >= 5 in gdb.linespec/cpls-abi-tag.exp
Date: Tue, 29 Aug 2023 17:27:41 +0200	[thread overview]
Message-ID: <20230829152742.7695-3-tdevries@suse.de> (raw)
In-Reply-To: <20230829152742.7695-1-tdevries@suse.de>

When running test-case gdb.linespec/cpls-abi-tag.exp with gcc 4.8.4, we run
into:
...
cpls-abi-tag.cc:71:26: error: ‘abi_tag’ attribute applied to non-function ‘s’
 ABI3 test_abi_tag_struct s;
                          ^
...

The test-case is supported starting gcc 5.

Fix this by requiring gcc >= 5, if a gcc compiler is used.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.linespec/cpls-abi-tag.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
index 63b4ccf4b4c..e24a5bf18e7 100644
--- a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
+++ b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
@@ -21,6 +21,14 @@ load_lib completion-support.exp
 
 standard_testfile cpls-abi-tag.cc
 
+if { [test_compiler_info gcc-*] } {
+    # With earlier gcc versions we run into:
+    #   cpls-abi-tag.cc:71:26: error:
+    #     ‘abi_tag’ attribute applied to non-function ‘s’
+    # See gcc PR65046.
+    require {expr [gcc_major_version] >= 5}
+}
+
 if {[prepare_for_testing "failed to prepare" $testfile \
 	 [list $srcfile] {c++ debug}]} {
     return -1
-- 
2.35.3


  parent reply	other threads:[~2023-08-29 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 15:27 [pushed 1/4] [gdb/testsuite] Fix false negative in have_host_locale Tom de Vries
2023-08-29 15:27 ` [pushed 2/4] [gdb/testsuite] Handle some test-cases with older compiler Tom de Vries
2023-08-29 15:27 ` Tom de Vries [this message]
2023-08-29 15:27 ` [pushed 4/4] [gdb/testsuite] Require have_compile_flag -mavx512f in gdb.arch/i386-avx512.exp Tom de Vries

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=20230829152742.7695-3-tdevries@suse.de \
    --to=tdevries@suse.de \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).