public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/23585] [4.0 regression] mem_fun* code fine with -O1, bus error with -O2
Date: Tue, 11 Oct 2005 14:22:00 -0000 [thread overview]
Message-ID: <20051011142246.15008.qmail@sourceware.org> (raw)
In-Reply-To: <bug-23585-11161@http.gcc.gnu.org/bugzilla/>
------- Comment #11 from mark at codesourcery dot com 2005-10-11 14:22 -------
Subject: Re: [4.0 regression] mem_fun* code fine
with -O1, bus error with -O2
ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #10 from ebotcazou at gcc dot gnu dot org 2005-10-11 13:59 -------
>
>>may_trap_p is the correct thing as it should detect this instruction as
>>trapping:
>>
>> /* Memory ref can trap unless it's a static var or a stack slot. */
>> case MEM:
>> if (MEM_NOTRAP_P (x))
>> return 0;
>> return rtx_addr_can_trap_p (XEXP (x, 0));
>
>
> No, it's the other way around. The MEM is a stack slot so may_trap_p returns
> 0.
This certainly is a bug in the back-end, not a bug in the default
location of the v-bit. You shouldn't need to break the C++ ABI on SPARC
to fix this bug.
However, I'm not sure why you're seeing a 4-byte load from an unaligned
address. One possibility is that in rtx_addr_can_trap_p:
case PLUS:
/* An address is assumed not to trap if it is an address that
can't
trap plus a constant integer or it is the pic register plus a
constant. */
return ! ((! rtx_addr_can_trap_p (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST_INT)
|| (XEXP (x, 0) == pic_offset_table_rtx
&& CONSTANT_P (XEXP (x, 1))));
we should consider the address as unsafe if the CONST_INT is not a
multiple of the size of the mode, on a STRICT_ALIGNMENT target.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23585
next prev parent reply other threads:[~2005-10-11 14:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-23585-11161@http.gcc.gnu.org/bugzilla/>
2005-10-10 22:42 ` [Bug middle-end/23585] [4.0 Regression] " ebotcazou at gcc dot gnu dot org
2005-10-10 22:42 ` ebotcazou at gcc dot gnu dot org
2005-10-10 22:47 ` [Bug middle-end/23585] [4.0 regression] " ebotcazou at gcc dot gnu dot org
2005-10-11 10:42 ` [Bug target/23585] " ebotcazou at gcc dot gnu dot org
2005-10-11 10:54 ` [Bug rtl-optimization/23585] " ebotcazou at gcc dot gnu dot org
2005-10-11 13:43 ` giovannibajo at libero dot it
2005-10-11 13:51 ` ebotcazou at gcc dot gnu dot org
2005-10-11 13:54 ` Andrew Pinski
2005-10-11 13:55 ` pinskia at physics dot uc dot edu
2005-10-11 13:59 ` ebotcazou at gcc dot gnu dot org
2005-10-11 14:22 ` mark at codesourcery dot com [this message]
2005-10-11 14:41 ` ebotcazou at gcc dot gnu dot org
2005-10-11 14:47 ` mark at codesourcery dot com
2005-10-11 16:24 ` ebotcazou at gcc dot gnu dot org
2005-10-11 17:16 ` giovannibajo at libero dot it
2005-10-11 17:31 ` mark at codesourcery dot com
2005-10-11 22:05 ` mmitchel at gcc dot gnu dot org
2005-10-11 22:21 ` ebotcazou at gcc dot gnu dot org
2005-10-11 22:57 ` giovannibajo at libero dot it
2005-10-12 6:39 ` ebotcazou at gcc dot gnu dot org
2005-10-20 12:14 ` cvs-commit at gcc dot gnu dot org
2005-10-20 12:18 ` cvs-commit at gcc dot gnu dot org
2005-10-20 12:20 ` ebotcazou at gcc dot gnu dot org
2005-11-03 11:31 ` ebotcazou at gcc dot gnu dot org
2005-11-03 11:35 ` ebotcazou at gcc dot gnu dot org
2005-12-19 15:47 ` danglin at gcc dot gnu dot 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=20051011142246.15008.qmail@sourceware.org \
--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).