public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/47337] [4.6 Regression] memory unsafety bug leading to wrong code generation
Date: Tue, 18 Jan 2011 10:10:00 -0000 [thread overview]
Message-ID: <bug-47337-4-vgij7cGZqH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47337-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47337
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.6.0
Summary|memory unsafety bug leading |[4.6 Regression] memory
|to wrong code generation |unsafety bug leading to
| |wrong code generation
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-18 09:04:46 UTC ---
Confirmed, goes away with -fno-partial-inlining, happens only with -m32.
>From brief look at it it looks like a RTL DCE bug, it removes a __divdi3 call,
but takes away with it also a needed unrelated store:
(insn 203 105 204 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp)
(const_int 8 [0x8])) [0 S4 A32])
(const_int 10 [0xa])) pr47337.c:14 64 {*movsi_internal}
(nil))
(insn 204 203 205 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp)
(const_int 12 [0xc])) [0 S4 A32])
(const_int 0 [0])) pr47337.c:14 64 {*movsi_internal}
(nil))
(insn 205 204 206 6 (set (mem:SI (reg/f:SI 7 sp) [0 S4 A32])
(const_int 0 [0])) pr47337.c:14 64 {*movsi_internal}
(nil))
(insn 206 205 190 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp)
(const_int 4 [0x4])) [0 S4 A32])
(const_int 0 [0])) pr47337.c:14 64 {*movsi_internal}
(nil))
(insn 190 206 110 6 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
(const_int 28 [0x1c])) [5 S4 A32])
(reg:SI 2 cx)) pr47337.c:14 64 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 2 cx)
(nil)))
(call_insn/u 110 190 179 6 (set (reg:DI 0 ax)
(call (mem:QI (symbol_ref:SI ("__divdi3") [flags 0x41]) [0 S1 A8])
(const_int 16 [0x10]))) pr47337.c:14 927 {*call_value_0}
(expr_list:REG_UNUSED (reg:DI 0 ax)
(expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000])
(nil)))
(expr_list:REG_DEP_TRUE (use (mem:DI (reg/f:SI 7 sp) [0 S8 A8]))
(expr_list:REG_DEP_TRUE (use (mem:DI (plus:SI (reg/f:SI 7 sp)
(const_int 8 [0x8])) [0 S8 A8]))
(nil))))
The sp+0x1c store shouldn't be deleted, but it is.
next prev parent reply other threads:[~2011-01-18 9:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 8:25 [Bug c/47337] New: " regehr at cs dot utah.edu
2011-01-18 10:10 ` jakub at gcc dot gnu.org [this message]
2011-01-18 10:25 ` [Bug rtl-optimization/47337] [4.6 Regression] Wrong RTL dce of calls jakub at gcc dot gnu.org
2011-01-18 10:32 ` jakub at gcc dot gnu.org
2011-01-19 15:57 ` jakub at gcc dot gnu.org
2011-01-19 15:58 ` jakub at gcc dot gnu.org
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=bug-47337-4-vgij7cGZqH@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).