public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
@ 2006-09-11 17:46 ` pinskia at gcc dot gnu dot org
2006-09-11 17:49 ` tromey at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-11 17:46 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugs at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
2006-09-11 17:46 ` [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2 pinskia at gcc dot gnu dot org
@ 2006-09-11 17:49 ` tromey at gcc dot gnu dot org
2006-09-11 18:01 ` tromey at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-11 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from tromey at gcc dot gnu dot org 2006-09-11 17:49 -------
Created an attachment (id=12225)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12225&action=view)
preprocessed source
Added a self-contained .i file
Compile with -O2 => fails
Compile with -g => works
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
2006-09-11 17:46 ` [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2 pinskia at gcc dot gnu dot org
2006-09-11 17:49 ` tromey at gcc dot gnu dot org
@ 2006-09-11 18:01 ` tromey at gcc dot gnu dot org
2006-09-11 18:06 ` tromey at gcc dot gnu dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-11 18:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from tromey at gcc dot gnu dot org 2006-09-11 18:01 -------
Created an attachment (id=12226)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12226&action=view)
valgrind report
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-09-11 18:01 ` tromey at gcc dot gnu dot org
@ 2006-09-11 18:06 ` tromey at gcc dot gnu dot org
2006-09-11 18:18 ` [Bug rtl-optimization/28096] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-11 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from tromey at gcc dot gnu dot org 2006-09-11 18:06 -------
I compiled with -O1 and ran valgrind; the results were clean.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-09-11 18:06 ` tromey at gcc dot gnu dot org
@ 2006-09-11 18:18 ` pinskia at gcc dot gnu dot org
2006-09-11 19:48 ` dannysmith at users dot sourceforge dot net
` (11 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-11 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2006-09-11 18:18 -------
-O2 -fno-gcse works.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |rtl-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-09-11 18:18 ` [Bug rtl-optimization/28096] " pinskia at gcc dot gnu dot org
@ 2006-09-11 19:48 ` dannysmith at users dot sourceforge dot net
2006-09-13 8:32 ` ebotcazou at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2006-09-11 19:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from dannysmith at users dot sourceforge dot net 2006-09-11 19:47 -------
In my sources for David Gay's gdtoa implemntation it say this:
/* On a machine with IEEE extended-precision registers, it is
* necessary to specify double-precision (53-bit) rounding precision
* before invoking strtod or dtoa. If the machine uses (the equivalent
* of) Intel 80x87 arithmetic, the call
* _control87(PC_53, MCW_PC);
* does this with many compilers. Whether this or another call is
* appropriate depends on the compiler; for this to work, it may be
* necessary to #include "float.h" or another system-dependent header
* file.
*/
There is a variant of strtod in the gdtoa file strtodnrp.c:
/* This is a variant of strtod that works on Intel ia32 systems */
/* with the default extended-precision arithmetic -- it does not */
/* require setting the precision control to 53 bits. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-09-11 19:48 ` dannysmith at users dot sourceforge dot net
@ 2006-09-13 8:32 ` ebotcazou at gcc dot gnu dot org
2006-09-14 8:27 ` aph at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-13 8:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from ebotcazou at gcc dot gnu dot org 2006-09-13 08:32 -------
Please indicate whether it's a regression from earlier versions of GCC.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-09-13 8:32 ` ebotcazou at gcc dot gnu dot org
@ 2006-09-14 8:27 ` aph at gcc dot gnu dot org
2006-09-20 16:57 ` tromey at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-09-14 8:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from aph at gcc dot gnu dot org 2006-09-14 08:27 -------
I don't think this bug has anything to do with excess precision. Valgrind
shows that, when compiled at -O2, we are reading from uninitialized memory.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-09-14 8:27 ` aph at gcc dot gnu dot org
@ 2006-09-20 16:57 ` tromey at gcc dot gnu dot org
2006-09-20 17:38 ` [Bug rtl-optimization/28096] [4.2 regression] " ebotcazou at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-20 16:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from tromey at gcc dot gnu dot org 2006-09-20 16:57 -------
Yes, this is a regression.
It works fine with -O2 with my system compiler (FC5 gcc, based on gcc 4.1).
It also works fine with -O2 using my gcc 4.1 build.
It fails with svn head.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-09-20 16:57 ` tromey at gcc dot gnu dot org
@ 2006-09-20 17:38 ` ebotcazou at gcc dot gnu dot org
2006-09-20 17:39 ` ebotcazou at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-20 17:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from ebotcazou at gcc dot gnu dot org 2006-09-20 17:38 -------
> Yes, this is a regression.
> It works fine with -O2 with my system compiler (FC5 gcc, based on gcc 4.1).
> It also works fine with -O2 using my gcc 4.1 build.
> It fails with svn head.
Thanks for the info.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|fdlibm/strtod.c miscompiled |[4.2 regression]
|at -O2 |fdlibm/strtod.c miscompiled
| |at -O2
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-09-20 17:38 ` [Bug rtl-optimization/28096] [4.2 regression] " ebotcazou at gcc dot gnu dot org
@ 2006-09-20 17:39 ` ebotcazou at gcc dot gnu dot org
2006-09-20 22:10 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-20 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from ebotcazou at gcc dot gnu dot org 2006-09-20 17:39 -------
Investigating.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-09-10 09:03:40 |2006-09-20 17:39:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-09-20 17:39 ` ebotcazou at gcc dot gnu dot org
@ 2006-09-20 22:10 ` mmitchel at gcc dot gnu dot org
2006-09-29 20:40 ` ebotcazou at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-20 22:10 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2006-09-20 22:10 ` mmitchel at gcc dot gnu dot org
@ 2006-09-29 20:40 ` ebotcazou at gcc dot gnu dot org
2006-09-30 8:30 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-29 20:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from ebotcazou at gcc dot gnu dot org 2006-09-29 20:40 -------
> I don't think this bug has anything to do with excess precision. Valgrind
> shows that, when compiled at -O2, we are reading from uninitialized memory.
Confirmed:
andl -144(%ebp), %ebx <--- bogus value in %ebx
movl %eax, -144(%ebp)
Swap the lines and all works fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2006-09-29 20:40 ` ebotcazou at gcc dot gnu dot org
@ 2006-09-30 8:30 ` pinskia at gcc dot gnu dot org
2006-09-30 8:50 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-30 8:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from pinskia at gcc dot gnu dot org 2006-09-30 08:29 -------
(In reply to comment #19)
> Confirmed:
>
> andl -144(%ebp), %ebx <--- bogus value in %ebx
> movl %eax, -144(%ebp)
This smells like an aliasing issue.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |alias
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2006-09-30 8:30 ` pinskia at gcc dot gnu dot org
@ 2006-09-30 8:50 ` ebotcazou at gcc dot gnu dot org
2006-09-30 13:31 ` ebotcazou at gcc dot gnu dot org
2006-09-30 13:35 ` ebotcazou at gcc dot gnu dot org
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-30 8:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from ebotcazou at gcc dot gnu dot org 2006-09-30 08:50 -------
> This smells like an aliasing issue.
But it's not, it's if-conversion.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|alias |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2006-09-30 8:50 ` ebotcazou at gcc dot gnu dot org
@ 2006-09-30 13:31 ` ebotcazou at gcc dot gnu dot org
2006-09-30 13:35 ` ebotcazou at gcc dot gnu dot org
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-30 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from ebotcazou at gcc dot gnu dot org 2006-09-30 13:31 -------
Subject: Bug 28096
Author: ebotcazou
Date: Sat Sep 30 13:31:29 2006
New Revision: 117331
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117331
Log:
PR rtl-optimization/28096
* ifcvt.c (check_cond_move_block): Return FALSE if the source of an
assignment has already been used as a destination earlier in the
block.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/20060930-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ifcvt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug rtl-optimization/28096] [4.2 regression] fdlibm/strtod.c miscompiled at -O2
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
` (15 preceding siblings ...)
2006-09-30 13:31 ` ebotcazou at gcc dot gnu dot org
@ 2006-09-30 13:35 ` ebotcazou at gcc dot gnu dot org
16 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-30 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from ebotcazou at gcc dot gnu dot org 2006-09-30 13:35 -------
Should work now.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |09/msg01398.html
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2006-09-30 13:35 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-28096-12856@http.gcc.gnu.org/bugzilla/>
2006-09-11 17:46 ` [Bug middle-end/28096] fdlibm/strtod.c miscompiled at -O2 pinskia at gcc dot gnu dot org
2006-09-11 17:49 ` tromey at gcc dot gnu dot org
2006-09-11 18:01 ` tromey at gcc dot gnu dot org
2006-09-11 18:06 ` tromey at gcc dot gnu dot org
2006-09-11 18:18 ` [Bug rtl-optimization/28096] " pinskia at gcc dot gnu dot org
2006-09-11 19:48 ` dannysmith at users dot sourceforge dot net
2006-09-13 8:32 ` ebotcazou at gcc dot gnu dot org
2006-09-14 8:27 ` aph at gcc dot gnu dot org
2006-09-20 16:57 ` tromey at gcc dot gnu dot org
2006-09-20 17:38 ` [Bug rtl-optimization/28096] [4.2 regression] " ebotcazou at gcc dot gnu dot org
2006-09-20 17:39 ` ebotcazou at gcc dot gnu dot org
2006-09-20 22:10 ` mmitchel at gcc dot gnu dot org
2006-09-29 20:40 ` ebotcazou at gcc dot gnu dot org
2006-09-30 8:30 ` pinskia at gcc dot gnu dot org
2006-09-30 8:50 ` ebotcazou at gcc dot gnu dot org
2006-09-30 13:31 ` ebotcazou at gcc dot gnu dot org
2006-09-30 13:35 ` ebotcazou at gcc dot gnu dot 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).