public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions
@ 2005-02-17 16:06 hp at gcc dot gnu dot org
2005-02-17 16:08 ` [Bug tree-optimization/20024] " hp at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-02-17 16:06 UTC (permalink / raw)
To: gcc-bugs
Using a combined tree and Geoff K's regression tester script, a multitude of
failures have been introduced between LAST_UPDATED "Thu Feb 17 03:51:44 UTC
2005" and "Thu Feb 17 08:42:30 UTC 2005". There's only one change in that
time-frame:
+ 2005-02-17 Jason Merrill <jason@redhat.com>
+
+ PR mudflap/19319, c++/19317
+ * gimplify.c (gimplify_modify_expr_rhs) [CALL_EXPR]: Make return
+ slot explicit.
+
Here's an excerpt of the failures introduced:
Running
/home/hp/cvs_areas/combined/combined/gcc/testsuite/gcc.c-torture/execute/execute.exp
...
FAIL: gcc.c-torture/execute/20000402-1.c execution, -O0
FAIL: gcc.c-torture/execute/20000511-1.c execution, -O0
FAIL: gcc.c-torture/execute/20010222-1.c execution, -O0
FAIL: gcc.c-torture/execute/20010222-1.c execution, -O1
FAIL: gcc.c-torture/execute/20010222-1.c execution, -O2
FAIL: gcc.c-torture/execute/20010222-1.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20010222-1.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20010222-1.c execution, -Os
FAIL: gcc.c-torture/execute/20020201-1.c execution, -O0
FAIL: gcc.c-torture/execute/20020201-1.c execution, -O1
FAIL: gcc.c-torture/execute/20020201-1.c execution, -O2
FAIL: gcc.c-torture/execute/20020201-1.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20020201-1.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20020201-1.c execution, -Os
FAIL: gcc.c-torture/execute/20020904-1.c execution, -O0
FAIL: gcc.c-torture/execute/20020904-1.c execution, -O1
FAIL: gcc.c-torture/execute/20020904-1.c execution, -O2
FAIL: gcc.c-torture/execute/20020904-1.c execution, -Os
FAIL: gcc.c-torture/execute/20021119-1.c execution, -O0
FAIL: gcc.c-torture/execute/20021119-1.c execution, -O1
FAIL: gcc.c-torture/execute/20021119-1.c execution, -O2
FAIL: gcc.c-torture/execute/20021119-1.c execution, -Os
FAIL: gcc.c-torture/execute/20021120-2.c execution, -O0
FAIL: gcc.c-torture/execute/20021120-2.c execution, -O1
FAIL: gcc.c-torture/execute/20021120-2.c execution, -O2
FAIL: gcc.c-torture/execute/20021120-2.c execution, -Os
FAIL: gcc.c-torture/execute/20021120-3.c execution, -O0
FAIL: gcc.c-torture/execute/20021120-3.c execution, -O1
FAIL: gcc.c-torture/execute/20021120-3.c execution, -O2
FAIL: gcc.c-torture/execute/20021120-3.c execution, -Os
FAIL: gcc.c-torture/execute/20030117-1.c execution, -O0
FAIL: gcc.c-torture/execute/20030117-1.c execution, -O1
FAIL: gcc.c-torture/execute/20030117-1.c execution, -O2
FAIL: gcc.c-torture/execute/20030117-1.c execution, -Os
FAIL: gcc.c-torture/execute/20030128-1.c execution, -O0
FAIL: gcc.c-torture/execute/20030128-1.c execution, -O1
FAIL: gcc.c-torture/execute/20030128-1.c execution, -O2
FAIL: gcc.c-torture/execute/20030128-1.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20030128-1.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20030128-1.c execution, -Os
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O0
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O1
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O2
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20040629-1.c execution, -Os
FAIL: gcc.c-torture/execute/20040705-1.c execution, -O0
FAIL: gcc.c-torture/execute/20040705-1.c execution, -O1
FAIL: gcc.c-torture/execute/20040705-1.c execution, -O2
FAIL: gcc.c-torture/execute/20040705-1.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20040705-1.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20040705-1.c execution, -Os
FAIL: gcc.c-torture/execute/20040705-2.c execution, -O0
FAIL: gcc.c-torture/execute/20040705-2.c execution, -O1
FAIL: gcc.c-torture/execute/20040705-2.c execution, -O2
FAIL: gcc.c-torture/execute/20040705-2.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/20040705-2.c execution, -O3 -g
FAIL: gcc.c-torture/execute/20040705-2.c execution, -Os
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O0
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O1
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O2
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O3 -fomit-frame-pointer
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O3 -fomit-frame-pointer
-funroll-loops
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions
WARNING: program timed out.
FAIL: gcc.c-torture/execute/920501-2.c execution, -O3 -g
Messages in gcc.log indicate that all or most of the failures are due to
calls to abort ().
Simulator traces on the simple gcc.c-torture/execute/20010222-1.c -O0
show that the libgcc __Div is miscompiled.
I'm attaching preprocessed source for it. Compile with -O2.
Note that do_31div is an aggregate-return function.
--
Summary: [4.0 regression] miscompilation of division support
functions
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: jason at redhat dot com
ReportedBy: hp at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: cris-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
@ 2005-02-17 16:08 ` hp at gcc dot gnu dot org
2005-02-17 16:12 ` hp at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-02-17 16:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hp at gcc dot gnu dot org 2005-02-17 10:16 -------
Created an attachment (id=8213)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8213&action=view)
Preprocessed source for __Div
_divsi3.i
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
2005-02-17 16:08 ` [Bug tree-optimization/20024] " hp at gcc dot gnu dot org
@ 2005-02-17 16:12 ` hp at gcc dot gnu dot org
2005-02-17 17:04 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-02-17 16:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hp at gcc dot gnu dot org 2005-02-17 10:23 -------
Here's the faulty program flow for the __Div call for
gcc.c-torture/execute/20010222-1.c -O0.
(-72 / 12; -72 in R10, 12 in R11; R10 holds the return value which should be
-6, not 0):
ffffffb8 c 6 ffffffb8 30 > __Div
000176 subq 4,sp
000178 {sp-=4} movem r0,[sp]
00017a move.d r10,r0
00017c {r0=ffffffb8} xor r11,r0
00017e {r0=ffffffb4} abs r10,r12
000180 {r12=48} blt 0x19a:__Div+0x24
000182 abs r11,r11
000184 clear.d r9
000186 {r9=0} move.d r9,r10
000188 {r10=0} add.d r9,r10
00018a test.d r0
00018c blt 0x194:__Div+0x1e
00018e nop
000194 neg.d r10,r10
000196 ret
000198 movem [sp+],r0
Ask if there's clarification needed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
2005-02-17 16:08 ` [Bug tree-optimization/20024] " hp at gcc dot gnu dot org
2005-02-17 16:12 ` hp at gcc dot gnu dot org
@ 2005-02-17 17:04 ` pinskia at gcc dot gnu dot org
2005-02-17 20:02 ` hp at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-17 17:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-17 13:21 -------
It also broke Alpha too see the message from RTH:
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00978.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-02-17 17:04 ` pinskia at gcc dot gnu dot org
@ 2005-02-17 20:02 ` hp at gcc dot gnu dot org
2005-02-17 20:14 ` [Bug middle-end/20024] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-02-17 20:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hp at gcc dot gnu dot org 2005-02-17 15:31 -------
Yes I did read RTH's message at the time, but this breakage seems
different than what he described: it looks as if the whole inlined
do_31div (the one with the aggregate return value) is misoptimized
away. Hope that helps.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-02-17 20:02 ` hp at gcc dot gnu dot org
@ 2005-02-17 20:14 ` pinskia at gcc dot gnu dot org
2005-02-19 19:36 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-17 20:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-02-17 20:14 ` [Bug middle-end/20024] " pinskia at gcc dot gnu dot org
@ 2005-02-19 19:36 ` jakub at gcc dot gnu dot org
2005-02-19 20:28 ` hp at gcc dot gnu dot org
2005-02-19 20:37 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-19 19:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-02-19 11:53 -------
Can't this be closed now that
2005-02-18 Jason Merrill <jason@redhat.com>
* gimplify.c (gimplify_modify_expr_rhs) [CALL_EXPR]: Revert again.
is in?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-02-19 19:36 ` jakub at gcc dot gnu dot org
@ 2005-02-19 20:28 ` hp at gcc dot gnu dot org
2005-02-19 20:37 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-02-19 20:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hp at gcc dot gnu dot org 2005-02-19 14:30 -------
Jason's patch has been reverted.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/20024] [4.0 regression] miscompilation of division support functions
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-02-19 20:28 ` hp at gcc dot gnu dot org
@ 2005-02-19 20:37 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-19 20:37 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20024
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-02-19 14:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 16:06 [Bug tree-optimization/20024] New: [4.0 regression] miscompilation of division support functions hp at gcc dot gnu dot org
2005-02-17 16:08 ` [Bug tree-optimization/20024] " hp at gcc dot gnu dot org
2005-02-17 16:12 ` hp at gcc dot gnu dot org
2005-02-17 17:04 ` pinskia at gcc dot gnu dot org
2005-02-17 20:02 ` hp at gcc dot gnu dot org
2005-02-17 20:14 ` [Bug middle-end/20024] " pinskia at gcc dot gnu dot org
2005-02-19 19:36 ` jakub at gcc dot gnu dot org
2005-02-19 20:28 ` hp at gcc dot gnu dot org
2005-02-19 20:37 ` pinskia 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).