This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/11252] [3.3/3.4 regression] code generation bug
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2003 18:15:57 -0000
- Subject: [Bug optimization/11252] [3.3/3.4 regression] code generation bug
- References: <20030619161042.11252.simonmar@microsoft.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11252
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |DUPLICATE
Target Milestone|3.3.1 |3.4
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2003-06-20 18:15 -------
Bad news: the bug is a duplicate of PR c/7871, which has not yet been sorted
out. The global register variable support is buggy in GCC 3.x and you ran into
another incarnation of the problem.
The reorg pass thinks it can hoist the last occurence of Sp--; up to before
if (Sp[0] == (W_)&stg_blockAsyncExceptionszh_ret_info) {
because Sp is wrongly marked as dying in
((F_) (stg_gen_chk))();
The problem was explained by Jim for PR c/7871:
"We first call mark_set_1 (... CLOBBER...) which kills the register.
Then we call mark_used_reg which makes it live again, and adds a
REG_DEAD note to the call. This REG_DEAD note is wrong. This confuses
combine into deleting the instruction because there is a REG_DEAD note
for it and no visible use of it after combination. It doesn't seem
right to modify combine to treat REG_DEAD notes for global regs
specially. I think we need to avoid adding the REG_DEAD note in the
first place."
The bug was not triggered in GCC 3.2.3 because of a different evaluation of
branch probabilities.
*** This bug has been marked as a duplicate of 7871 ***