public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Edelsohn <dje@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-2408] testsuite: libstdc++ atomic_float/value_init.cc requires libatomic
Date: Wed, 29 Jul 2020 14:00:54 +0000 (GMT)	[thread overview]
Message-ID: <20200729140054.9BD7F3857C53@sourceware.org> (raw)

https://gcc.gnu.org/g:55ede0bb87e74463c5b89fbfd501e85e9e683048

commit r11-2408-g55ede0bb87e74463c5b89fbfd501e85e9e683048
Author: David Edelsohn <dje.gcc@gmail.com>
Date:   Tue Jul 28 16:22:04 2020 -0400

    testsuite: libstdc++ atomic_float/value_init.cc requires libatomic
    
    atomic_float/value_init.cc requires libatomic for some targets, i.e., when
    it tries to perform an atomic operation with a 64 bit floating point
    double type on a 32 bit target.  This patch adds AIX and Darwin to the
    list of targets that require the libatomic option and adds the option to
    the atomic_float/value_init.cc testcase.
    
    libstdc++-v3/ChangeLog:
    
    2020-07-28  David Edelsohn  <dje.gcc@gmail.com>
                Jonathan Wakely  <jwakely@redhat.com>
                Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
            target powerpc-ibm-aix* and powerpc*-*-darwin*.
            * testsuite/29_atomics/atomic_float/value_init.cc: Add options
            for libatomic.

Diff:
---
 libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc | 1 +
 libstdc++-v3/testsuite/lib/dg-options.exp                    | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
index 237c0dd13ed..38af9bdc8d4 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { target c++2a } }
+// { dg-add-options libatomic }
 
 #include <atomic>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index 9bfae71adf3..d3f61cb5267 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -260,7 +260,10 @@ proc add_options_for_net_ts { flags } {
 # Add to FLAGS all the target-specific flags to link to libatomic, if required.
 
 proc add_options_for_libatomic { flags } {
-    if { [istarget hppa*-*-hpux*] || [istarget riscv*-*-*] } {
+    if { [istarget hppa*-*-hpux*]
+	 || [istarget powerpc-ibm-aix*]
+	 || [istarget powerpc*-*-darwin*]
+	 || [istarget riscv*-*-*] } {
 	return "$flags -L../../libatomic/.libs -latomic"
     }
     return $flags


                 reply	other threads:[~2020-07-29 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200729140054.9BD7F3857C53@sourceware.org \
    --to=dje@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.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).