* [Bug tdep/29816] [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
@ 2022-11-21 17:45 ` vries at gcc dot gnu.org
2022-11-21 17:50 ` vries at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-21 17:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|12.1 |HEAD
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Nope, still fails on master.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tdep/29816] [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
2022-11-21 17:45 ` [Bug tdep/29816] " vries at gcc dot gnu.org
@ 2022-11-21 17:50 ` vries at gcc dot gnu.org
2022-11-21 18:00 ` vries at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-21 17:50 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
reproducible with:
...
$ gdb -q -batch -ex "set language ada" -ex "print
16llf#4000921fb54442d18469898cc51701b8#"
$1 = <invalid float value>
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tdep/29816] [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
2022-11-21 17:45 ` [Bug tdep/29816] " vries at gcc dot gnu.org
2022-11-21 17:50 ` vries at gcc dot gnu.org
@ 2022-11-21 18:00 ` vries at gcc dot gnu.org
2022-11-23 11:21 ` [Bug testsuite/29816] [gdb/testsuite, " vries at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-21 18:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, so it seems floatformat_ibm_long_double_is_valid returns 0, because:
...
328 if (bot_exp > top_exp - 53 && bot_exp != 0)
(gdb) n
329 return 0;
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-11-21 18:00 ` vries at gcc dot gnu.org
@ 2022-11-23 11:21 ` vries at gcc dot gnu.org
2022-11-23 16:01 ` tromey at sourceware dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-23 11:21 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[gdb/tdep, powerpc64le] |[gdb/testsuite,
|FAIL: |powerpc64le] FAIL:
|gdb.ada/float-bits.exp: |gdb.ada/float-bits.exp:
|print |print
|16llf#4000921fb54442d184698 |16llf#4000921fb54442d184698
|98cc51701b8# |98cc51701b8#
CC| |cel at us dot ibm.com,
| |ulrich.weigand at de dot ibm.com
Component|tdep |testsuite
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Downgrading this to a test-case issue.
It's plausible that a hex representation is valid for one float format, and not
for another.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-11-23 11:21 ` [Bug testsuite/29816] [gdb/testsuite, " vries at gcc dot gnu.org
@ 2022-11-23 16:01 ` tromey at sourceware dot org
2022-11-23 17:01 ` vries at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2022-11-23 16:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
There's already a bit of code in this .exp to check for
non-IEEE floating-point and adapt. I guess this just needs
to be extended for this target.
My guess would be that it's not set up for little-endian PPC,
though I'm not 100% sure.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-11-23 16:01 ` tromey at sourceware dot org
@ 2022-11-23 17:01 ` vries at gcc dot gnu.org
2022-11-23 22:26 ` cel at us dot ibm.com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-23 17:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
This makes the test pass for me:
...
diff --git a/gdb/testsuite/gdb.ada/float-bits.exp
b/gdb/testsuite/gdb.ada/float-bits.exp
index 55a0566580c..3bf22637910 100644
--- a/gdb/testsuite/gdb.ada/float-bits.exp
+++ b/gdb/testsuite/gdb.ada/float-bits.exp
@@ -93,6 +93,10 @@ if { [istarget x86_64-*-* ] || [istarget i?86-*-*] } {
set invalid_long_double "16llf#9019a5c800007ffff7ff4054#"
set printed_long_double "5.0e\\+25"
}
+} elseif { [istarget powerpc*-*-*] } {
+ # 5.0e+25 in floatformat_ibm_long_double.
+ set valid_long_double "16llf#c1e1c000000000004544adf4b7320335#"
+ set printed_long_double "50000000000000000000000000.0"
}
# Exercise GDB-side long doubles.
...
but I suppose it'll fail for a compiler defaulting to floatformats_ieee_quad.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (5 preceding siblings ...)
2022-11-23 17:01 ` vries at gcc dot gnu.org
@ 2022-11-23 22:26 ` cel at us dot ibm.com
2022-11-24 6:27 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cel at us dot ibm.com @ 2022-11-23 22:26 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #7 from Carl E Love <cel at us dot ibm.com> ---
I tried the fix on Power 9 and Power 10. I see the same results with and
without the patch.
make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.ada/float-bits.exp '
The contents of gdb/testsuite/gdb.log:
print val_double^M
$8 = -2.0e-19^M
(gdb) PASS: gdb.ada/float-bits.exp: print val_double after assignment
ptype long_long_float^M
type = <8-byte float>^M
(gdb) ptype 16llf#0#^M
type = <16-byte float>^M
(gdb) print 16llf#4000921fb54442d18469898cc51701b8#^M
$9 = <invalid float value>^M
(gdb) FAIL: gdb.ada/float-bits.exp: print
16llf#4000921fb54442d18469898cc51701b8#
print $foo:=16llf#4000921fb54442d18469898cc51701b8#^M
$10 = <invalid float value>^M
(gdb) FAIL: gdb.ada/float-bits.exp: print
$foo:=16llf#4000921fb54442d18469898cc51701b8#
print $foo^M
$11 = <invalid float value>^M
(gdb) FAIL: gdb.ada/float-bits.exp: print internal long double variable after
assignment
testcase
/home/carll/GDB/build-current/gdb/testsuite/../../../binutils-gdb-current/gdb/testsuite/gdb.ada/float-bits.exp
c\
ompleted in 0 seconds
=== gdb Summary ===
# of expected passes 9
# of unexpected failures 3
You mentioned OBS, what is that? Perhaps there is something different in our
environments??
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (6 preceding siblings ...)
2022-11-23 22:26 ` cel at us dot ibm.com
@ 2022-11-24 6:27 ` vries at gcc dot gnu.org
2022-11-24 13:00 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-24 6:27 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Carl E Love from comment #7)
> I tried the fix on Power 9 and Power 10. I see the same results with and
> without the patch.
>
> make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.ada/float-bits.exp '
>
> The contents of gdb/testsuite/gdb.log:
>
> print val_double^M
> $8 = -2.0e-19^M
> (gdb) PASS: gdb.ada/float-bits.exp: print val_double after assignment
> ptype long_long_float^M
> type = <8-byte float>^M
> (gdb) ptype 16llf#0#^M
> type = <16-byte float>^M
> (gdb) print 16llf#4000921fb54442d18469898cc51701b8#^M
Is this a sign of the patch not being applied, or of the patch not working?
The patch attempts to print a different hex string here.
> $9 = <invalid float value>^M
> (gdb) FAIL: gdb.ada/float-bits.exp: print
> 16llf#4000921fb54442d18469898cc51701b8#
> print $foo:=16llf#4000921fb54442d18469898cc51701b8#^M
> $10 = <invalid float value>^M
> (gdb) FAIL: gdb.ada/float-bits.exp: print
> $foo:=16llf#4000921fb54442d18469898cc51701b8#
> print $foo^M
> $11 = <invalid float value>^M
> (gdb) FAIL: gdb.ada/float-bits.exp: print internal long double variable
> after assignment
> testcase
> /home/carll/GDB/build-current/gdb/testsuite/../../../binutils-gdb-current/
> gdb/testsuite/gdb.ada/float-bits.exp c\
> ompleted in 0 seconds
>
> === gdb Summary ===
>
> # of expected passes 9
> # of unexpected failures 3
>
>
>
> You mentioned OBS, what is that? Perhaps there is something different in our
> environments??
It's Open Build Service, specifically the place where I maintain a gdb package
for openSUSE/SLE ( https://build.opensuse.org/package/show/devel:gcc/gdb ).
But I debugged the test-case and wrote the fix outside of OBS.
A possibility for the FAILs with the patch that you mentioned, is that it's the
effect of having a different long double format.
The compiler I'm using is gcc 7.5.0, with the long double format defaulting to
--with-long-double-format=ibm.
But well, there could also be endian issues, I'm using powerpc64le.
The way I produced the hex string is by compiling:
...
long double a = 5.0e+25L;
int
main (void)
{
return 0;
}
...
and in gdb doing "p /x a".
So, which hex string are you seeing when you do that, and which long double
format are you using?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (7 preceding siblings ...)
2022-11-24 6:27 ` vries at gcc dot gnu.org
@ 2022-11-24 13:00 ` vries at gcc dot gnu.org
2022-11-30 14:00 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-24 13:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
I start to wonder whether we should give up trying to hardcode these hex
numbers, and just work with whatever is printed for "p /x Val_Long_Double".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (8 preceding siblings ...)
2022-11-24 13:00 ` vries at gcc dot gnu.org
@ 2022-11-30 14:00 ` vries at gcc dot gnu.org
2022-12-01 6:25 ` cvs-commit at gcc dot gnu.org
2022-12-01 6:27 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-30 14:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-November/194353.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (9 preceding siblings ...)
2022-11-30 14:00 ` vries at gcc dot gnu.org
@ 2022-12-01 6:25 ` cvs-commit at gcc dot gnu.org
2022-12-01 6:27 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-01 6:25 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32a5aa2625686a709b22db19300a578d96285dd1
commit 32a5aa2625686a709b22db19300a578d96285dd1
Author: Tom de Vries <tdevries@suse.de>
Date: Thu Dec 1 07:25:04 2022 +0100
[gdb/testsuite] Fix gdb.ada/float-bits.exp for powerpc64le
On powerpc64le-linux, I run into:
...
(gdb) print 16llf#4000921fb54442d18469898cc51701b8#^M
$9 = <invalid float value>^M
(gdb) FAIL: gdb.ada/float-bits.exp: print \
16llf#4000921fb54442d18469898cc51701b8#
...
The problem is that we're using a hex string for the 128-bit IEEE quad long
double format, but the actual long double float format is:
...
gdbarch_dump: long_double_format = floatformat_ibm_long_double_little^M
...
Fix this by using the hex string obtained by compiling test.c:
...
long double a = 5.0e+25L;
...
like so:
...
$ gcc -mlittle test.c -c -g
...
and running gdb:
...
$ gdb -q -batch test.o -ex "p /x a"
$1 = 0xc1e1c000000000004544adf4b7320335
...
and likewise for -mbig:
...
$ gdb -q -batch test.o -ex "p /x a"
$1 = 0x4544adf4b7320335c1e1c00000000000
...
Tested on powerpc64le-linux.
I excercised the case of floatformat_ibm_long_double_big by
using "set endian big" in the test-case.
Note that for this patch to work correctly, recent commit aaa79cd62b8
("[gdb]
Improve printing of float formats") is required.
PR testsuite/29816
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29816
Approved-By: Tom Tromey <tom@tromey.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug testsuite/29816] [gdb/testsuite, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#
2022-11-21 14:10 [Bug tdep/29816] New: [gdb/tdep, powerpc64le] FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8# vries at gcc dot gnu.org
` (10 preceding siblings ...)
2022-12-01 6:25 ` cvs-commit at gcc dot gnu.org
@ 2022-12-01 6:27 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2022-12-01 6:27 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29816
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |13.1
Resolution|--- |FIXED
--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by above commit.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread