public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc
@ 2012-10-31 5:39 hjl.tools at gmail dot com
2012-10-31 10:27 ` [Bug target/55145] " rguenth at gcc dot gnu.org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-31 5:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Bug #: 55145
Summary: [4.8 Regression] [x32] -maddress-mode=long miscompiles
glibc
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: ubizjak@gmail.com
After fixing PR 55142, GCC 4.8 revision 193001 miscompiles
glibc trunk for x32 with -maddress-mode=long. Most glibc
tests failed with "Segmentation fault". It is independent
of LRA and may have something to do with recent subreg
changes.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/55145] [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
@ 2012-10-31 10:27 ` rguenth at gcc dot gnu.org
2012-11-01 10:09 ` ubizjak at gmail dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-31 10:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/55145] [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
2012-10-31 10:27 ` [Bug target/55145] " rguenth at gcc dot gnu.org
@ 2012-11-01 10:09 ` ubizjak at gmail dot com
2012-11-01 22:29 ` hjl.tools at gmail dot com
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-01 10:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-11-01
Ever Confirmed|0 |1
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-01 10:08:50 UTC ---
So is this PR a manifestation of presumably wrong fix for PR 55142 or an
independent bug?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/55145] [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
2012-10-31 10:27 ` [Bug target/55145] " rguenth at gcc dot gnu.org
2012-11-01 10:09 ` ubizjak at gmail dot com
@ 2012-11-01 22:29 ` hjl.tools at gmail dot com
2012-11-04 8:11 ` [Bug middle-end/55145] Different bits for long double constant depending ptr_mode hjl.tools at gmail dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-01 22:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-01 22:29:22 UTC ---
I don't know if there are other bugs in addition to PR 55142.
I will leave it open until I can compile glibc to verify.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending ptr_mode
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (2 preceding siblings ...)
2012-11-01 22:29 ` hjl.tools at gmail dot com
@ 2012-11-04 8:11 ` hjl.tools at gmail dot com
2012-11-04 10:14 ` [Bug middle-end/55145] Different bits for long double constant depending on long int size hjl.tools at gmail dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-04 8:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
Summary|[4.8 Regression] [x32] |Different bits for long
|-maddress-mode=long |double constant depending
|miscompiles glibc |ptr_mode
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-04 08:11:01 UTC ---
GCC i386 and GCC x86-64 generate different bits long double constant
depending ptr_mode:
[hjl@gnu-tools-1 tmp]$ cat y.c
const long double
pio2_hi = 1.5707963267948966192021943710788178805159986950457096099853515625L;
[hjl@gnu-tools-1 tmp]$ /usr/gcc-4.7.3-32bit/bin/gcc -S y.c -o 32.s
[hjl@gnu-tools-1 tmp]$ gcc -S y.c -o 64.s
[hjl@gnu-tools-1 tmp]$ diff -up 64.s 32.s
--- 64.s 2012-11-04 01:06:52.492398183 -0700
+++ 32.s 2012-11-04 01:06:47.685344002 -0700
@@ -3,11 +3,10 @@
.section .rodata
.align 16
.type pio2_hi, @object
- .size pio2_hi, 16
+ .size pio2_hi, 12
pio2_hi:
- .long 560513588
- .long 3373259426
+ .long 560513589
+ .long -921707870
.long 16383
- .long 0
- .ident "GCC: (GNU) 4.7.2 20120921 (Red Hat 4.7.2-2)"
+ .ident "GCC: (GNU) 4.7.3 20121024 (prerelease)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 tmp]$ gcc -c 32.s 64.s
[hjl@gnu-tools-1 tmp]$ objdump -s -j .rodata 32.o > 32
[hjl@gnu-tools-1 tmp]$ objdump -s -j .rodata 64.o > 64
[hjl@gnu-tools-1 tmp]$ diff -up 32 64
--- 32 2012-11-04 01:07:37.341913094 -0700
+++ 64 2012-11-04 01:07:42.192979572 -0700
@@ -1,5 +1,5 @@
-32.o: file format elf64-x86-64
+64.o: file format elf64-x86-64
Contents of section .rodata:
- 0000 35c26821 a2da0fc9 ff3f0000 5.h!.....?..
+ 0000 34c26821 a2da0fc9 ff3f0000 00000000 4.h!.....?......
[hjl@gnu-tools-1 tmp]$
Ignore padding, i386 GCC generates 35c26821 and
x86-64 generates 34c26821.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (3 preceding siblings ...)
2012-11-04 8:11 ` [Bug middle-end/55145] Different bits for long double constant depending ptr_mode hjl.tools at gmail dot com
@ 2012-11-04 10:14 ` hjl.tools at gmail dot com
2012-11-04 11:04 ` schwab@linux-m68k.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-04 10:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-04 10:14:07 UTC ---
It is due to long int usage in real.h. Depending on
size of long int, real.c gives slightly different
results.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (4 preceding siblings ...)
2012-11-04 10:14 ` [Bug middle-end/55145] Different bits for long double constant depending on long int size hjl.tools at gmail dot com
@ 2012-11-04 11:04 ` schwab@linux-m68k.org
2012-11-04 11:09 ` hjl.tools at gmail dot com
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schwab@linux-m68k.org @ 2012-11-04 11:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> 2012-11-04 11:04:03 UTC ---
This cannot explain the crashes you see since the difference is just one ULP.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (5 preceding siblings ...)
2012-11-04 11:04 ` schwab@linux-m68k.org
@ 2012-11-04 11:09 ` hjl.tools at gmail dot com
2012-11-04 22:52 ` hjl.tools at gmail dot com
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-04 11:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-04 11:09:12 UTC ---
(In reply to comment #5)
> This cannot explain the crashes you see since the difference is just one ULP.
The glibc crash is fixed by
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00248.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (6 preceding siblings ...)
2012-11-04 11:09 ` hjl.tools at gmail dot com
@ 2012-11-04 22:52 ` hjl.tools at gmail dot com
2012-11-04 23:43 ` vincent-gcc at vinc17 dot net
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-04 22:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-04 22:51:46 UTC ---
Here are different internal values from the same input:
32-bit long: 1.57079632679489661925640447970309310221637133509
Input: 1.5707963267948966192021943710788178805159986950457096099853515625
64-bit long: 1.57079632679489661914798426245454265881562605500221252441
Input value is extremely close to a half-way value between 32-bit
and 64-bit longs.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (7 preceding siblings ...)
2012-11-04 22:52 ` hjl.tools at gmail dot com
@ 2012-11-04 23:43 ` vincent-gcc at vinc17 dot net
2013-03-22 14:45 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: vincent-gcc at vinc17 dot net @ 2012-11-04 23:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
--- Comment #8 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> 2012-11-04 23:43:44 UTC ---
(In reply to comment #7)
> Here are different internal values from the same input:
>
> 32-bit long: 1.57079632679489661925640447970309310221637133509
> Input: 1.5707963267948966192021943710788178805159986950457096099853515625
> 64-bit long: 1.57079632679489661914798426245454265881562605500221252441
>
> Input value is extremely close to a half-way value between 32-bit
> and 64-bit longs.
1.5707963267948966192021943710788178805159986950457096099853515625 is *exactly*
the 65-bit binary number
1.1001001000011111101101010100010001000010110100011000010001101001, thus
exactly a halfway value between two consecutive long double numbers (for 64-bit
precision):
1.100100100001111110110101010001000100001011010001100001000110100
and
1.100100100001111110110101010001000100001011010001100001000110101
I suppose that the difference is due to the fact that the algorithm used in GCC
has not been written to round correctly, and if this algorithm uses variables
of type "long" internally, it is not surprising to get different results on
different architectures (32-bit long and 64-bit long).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (8 preceding siblings ...)
2012-11-04 23:43 ` vincent-gcc at vinc17 dot net
@ 2013-03-22 14:45 ` jakub at gcc dot gnu.org
2013-05-31 10:59 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.0 |4.8.1
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:44:28 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (9 preceding siblings ...)
2013-03-22 14:45 ` jakub at gcc dot gnu.org
@ 2013-05-31 10:59 ` jakub at gcc dot gnu.org
2013-10-16 9:49 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 10:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.1 |4.8.2
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (10 preceding siblings ...)
2013-05-31 10:59 ` jakub at gcc dot gnu.org
@ 2013-10-16 9:49 ` jakub at gcc dot gnu.org
2013-11-20 14:40 ` jsm28 at gcc dot gnu.org
2013-11-20 14:41 ` jsm28 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16 9:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.2 |4.8.3
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (11 preceding siblings ...)
2013-10-16 9:49 ` jakub at gcc dot gnu.org
@ 2013-11-20 14:40 ` jsm28 at gcc dot gnu.org
2013-11-20 14:41 ` jsm28 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-11-20 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Bug 55145 depends on bug 21718, which changed state.
Bug 21718 Summary: real.c rounding not perfect
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21718
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/55145] Different bits for long double constant depending on long int size
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
` (12 preceding siblings ...)
2013-11-20 14:40 ` jsm28 at gcc dot gnu.org
@ 2013-11-20 14:41 ` jsm28 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-11-20 14:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55145
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #12 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Just another instance of bug 21718.
*** This bug has been marked as a duplicate of bug 21718 ***
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-11-20 14:41 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 5:39 [Bug target/55145] New: [4.8 Regression] [x32] -maddress-mode=long miscompiles glibc hjl.tools at gmail dot com
2012-10-31 10:27 ` [Bug target/55145] " rguenth at gcc dot gnu.org
2012-11-01 10:09 ` ubizjak at gmail dot com
2012-11-01 22:29 ` hjl.tools at gmail dot com
2012-11-04 8:11 ` [Bug middle-end/55145] Different bits for long double constant depending ptr_mode hjl.tools at gmail dot com
2012-11-04 10:14 ` [Bug middle-end/55145] Different bits for long double constant depending on long int size hjl.tools at gmail dot com
2012-11-04 11:04 ` schwab@linux-m68k.org
2012-11-04 11:09 ` hjl.tools at gmail dot com
2012-11-04 22:52 ` hjl.tools at gmail dot com
2012-11-04 23:43 ` vincent-gcc at vinc17 dot net
2013-03-22 14:45 ` jakub at gcc dot gnu.org
2013-05-31 10:59 ` jakub at gcc dot gnu.org
2013-10-16 9:49 ` jakub at gcc dot gnu.org
2013-11-20 14:40 ` jsm28 at gcc dot gnu.org
2013-11-20 14:41 ` jsm28 at gcc dot gnu.org
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).