public inbox for
help / color / mirror / Atom feed
From: Alexandre Oliva <>
Subject: [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: complex proj requirements
Date: Thu, 23 Jun 2022 12:44:17 +0000 (GMT)	[thread overview]
Message-ID: <> (raw)

commit 64c2c61c8dbdd36f2dfff3956a110814a48958d3
Author: Alexandre Oliva <>
Date:   Mon Jun 20 19:43:55 2022 -0300

    libstdc++: testsuite: complex proj requirements
    The template version of complex::proj returns its argument without
    testing for infinities, and that's all we have when neither C99
    complex nor C99 math functions are available, and it seems too hard to
    do better without isinf and copysign.
    I suppose just calling them and expecting users will supply
    specializations as needed has been ruled out, and so has refraining
    from defining it when it can't be implemented correctly.
    It's pointless to run the test under these circumstances, so
    arrange for it to be skipped.  In an unusual way, after trying to
    introduce dg-require tests for ccomplex-or-cmath, and found their
    results to be misleading due to variations across -std=* versions.
    for  libstdc++-v3/ChangeLog
            * testsuite/26_numerics/complex/ Skip test in the
            circumstances in which the implementation of proj is known to
            be broken.

 libstdc++-v3/testsuite/26_numerics/complex/ | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/complex/ b/libstdc++-v3/testsuite/26_numerics/complex/
index a053119197c..69f8153c06f 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/
+++ b/libstdc++-v3/testsuite/26_numerics/complex/
@@ -397,6 +397,19 @@ test03()
+  /* If neither of these macros is nonzero, proj calls a
+     specialization of the __complex_proj template, that just returns
+     its argument, without testing for infinities, rendering the whole
+     test pointless, and failing (as intended/noted in the
+     implementation) the cases that involve infinities.  Alas, the
+     normal ways to skip tests may not work: we don't have a test for
+     C99_COMPLEX, and these macros may vary depending on -std=*, but
+     macro tests wouldn't take them into account.  */
+  if (true)
+    return 0;

             reply	other threads:[~2022-06-23 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 12:44 Alexandre Oliva [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-27 10:50 Alexandre Oliva
2022-06-27  9:33 Alexandre Oliva
2022-06-23 12:29 Alexandre Oliva
2022-06-23 12:22 Alexandre Oliva
2022-06-23 10:05 Alexandre Oliva
2022-06-23  7:15 Alexandre Oliva

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:

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

  git send-email \ \ \ \ \

* 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).