From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: gdb-patches@sourceware.org, sergiodj@redhat.com (Sergio Durigan Junior)
Subject: Re: New FAIL gdb.base/float128.exp on ppc64le [Re: [RFC v2][2/2] Target FP: Make use of MPFR if available]
Date: Wed, 20 Jun 2018 13:39:00 -0000 [thread overview]
Message-ID: <20180620133905.5B634D80294@oc3748833570.ibm.com> (raw)
In-Reply-To: <20180620125031.GA1067098@host1.jankratochvil.net> from "Jan Kratochvil" at Jun 20, 2018 02:50:31 PM
Jan Kratochvil wrote:
> On Wed, 20 Jun 2018 14:33:30 +0200, Ulrich Weigand wrote:
> > A result of "inf" instead of the large number is exactly the problem that
> > is fixed by using MPFR. So I'm wondering: is the GDB that shows the FAIL
> > actually built against MPFR? If at build time MPFR was not detected,
> > then this failure is exactly what you'd expect ...
>
> Thanks for the heads up, our GDB build was really missing this dependency.
Ah good, that explains it.
> Still maybe the testcase should contain such explanation of the FAIL.
Agreed. The attached patch adds a comment, and also updates the FAIL
message to indicate possible lack of MPFR support as reason. Does
this look good to you?
> Moreover maybe it could be an XFAIL.
I guess ... On the other hand, it does indicate a real bug in GDB;
if it had been an XFAIL, you probably wouldn't have noticed missing
MPFR support in your build now.
Bye,
Ulrich
testsuite/ChangeLog:
* gdb.base/float128.exp: Add comment and improved fail message
to the failure case of "print large128" test.
diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp
index 4c322b8ab3..26cabac776 100644
--- a/gdb/testsuite/gdb.base/float128.exp
+++ b/gdb/testsuite/gdb.base/float128.exp
@@ -75,5 +75,19 @@ gdb_test "print ld" ".* = 10\\.375.*" "the value of ld is changed to 10.375"
gdb_test "print f128" ".* = 20\\.375.*" "the value of f128 is changed to 20.375"
# Test that we can correctly handle the largest IEEE-128 value
-gdb_test "print large128" ".* = 1\\.18973149535723176508575932662800702e\\+4932" "print large128"
+# Note: If we get "inf" instead of the correct result, we may have run into
+# an internal overflow. This typically happens on host platforms without
+# native IEEE-128 support where GDB was built without MPFR support.
+set test "print large128"
+gdb_test_multiple "print large128" "$test" {
+ -re ".* = 1\\.18973149535723176508575932662800702e\\+4932.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re ".* = inf.*$gdb_prompt $" {
+ fail "$test (GDB may be missing MPFR support!)"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "$test"
+ }
+}
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2018-06-20 13:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 19:00 [RFC v2][2/2] Target FP: Make use of MPFR if available Ulrich Weigand
2017-11-29 0:37 ` John Baldwin
2017-11-29 17:55 ` Ulrich Weigand
2017-11-29 18:04 ` Pedro Alves
2017-11-30 0:27 ` John Baldwin
2017-12-10 15:10 ` Regression on i686 host: gdb.base/floatn.exp: " Jan Kratochvil
2017-12-10 15:13 ` Jan Kratochvil
2017-12-11 14:14 ` Ulrich Weigand
2017-12-11 14:30 ` Ulrich Weigand
2018-06-20 8:55 ` New FAIL gdb.base/float128.exp on ppc64le [Re: [RFC v2][2/2] Target FP: Make use of MPFR if available] Jan Kratochvil
2018-06-20 12:33 ` Ulrich Weigand
2018-06-20 12:50 ` Jan Kratochvil
2018-06-20 13:39 ` Ulrich Weigand [this message]
2018-06-20 13:47 ` Jan Kratochvil
2018-06-20 14:28 ` Ulrich Weigand
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=20180620133905.5B634D80294@oc3748833570.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=sergiodj@redhat.com \
/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