From: Richard Guenther <richard.guenther@gmail.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: DJ Delorie <dj@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: m32c support for named addr spaces branch
Date: Mon, 19 Oct 2009 14:36:00 -0000 [thread overview]
Message-ID: <84fc9c000910190735k5bda29bav9002e1f011d0cec6@mail.gmail.com> (raw)
In-Reply-To: <200910191424.n9JEOKrH032607@d12av02.megacenter.de.ibm.com>
On Mon, Oct 19, 2009 at 4:24 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> DJ Delorie wrote:
>
>> Found it, bug in expr.c:
>>
>> Index: expr.c
>> ===================================================================
>> --- expr.c (revision 152895)
>> +++ expr.c (working copy)
>> @@ -4248,13 +4248,13 @@ expand_assignment (tree to, tree from, b
>> }
>>
>> offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, EXPAND_SUM);
>> address_mode
>> = targetm.addr_space.address_mode (MEM_ADDR_SPACE (to_rtx));
>> if (GET_MODE (offset_rtx) != address_mode)
>> - offset_rtx = convert_to_mode (address_mode, offset_rtx, 0);
>> + offset_rtx = convert_to_mode (address_mode, offset_rtx, POINTERS_EXTEND_UNSIGNED);
>
> I'm not sure POINTERS_EXTEND_UNSIGNED is the correct test here; the offset
> is not itself a pointer type. What if the offset actually *is* a negative
> value of a smaller, signed type?
If the above is expanding a POINTER_PLUS_EXPR then the offset
needs to be extended as _signed_ always, independent of the
sign of sizetype which is the type of the offset (as sizetypes
are always sign-extended).
Richard.
next prev parent reply other threads:[~2009-10-19 14:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 4:17 DJ Delorie
2009-10-15 18:07 ` Ulrich Weigand
2009-10-15 18:11 ` DJ Delorie
2009-10-16 14:19 ` Ulrich Weigand
2009-10-16 18:22 ` DJ Delorie
2009-10-16 22:05 ` DJ Delorie
2009-10-19 14:28 ` Ulrich Weigand
2009-10-19 14:36 ` Richard Guenther [this message]
2009-10-19 17:45 ` Ulrich Weigand
2009-10-19 20:57 ` DJ Delorie
2009-10-20 9:27 ` Richard Guenther
2009-10-20 18:10 ` DJ Delorie
2009-10-21 10:20 ` Richard Guenther
2009-10-27 18:32 ` Ulrich Weigand
2009-10-28 11:29 ` Richard Guenther
2009-10-29 18:32 ` Fix PR tree-optimization/41857 (Re: m32c support for named addr spaces branch) Ulrich Weigand
2009-10-30 9:51 ` Richard Guenther
2009-11-02 9:38 ` Zdenek Dvorak
2009-11-16 20:07 ` [patch] Fix regression (Re: Fix PR tree-optimization/41857) Ulrich Weigand
2009-11-17 15:40 ` Richard Guenther
2009-11-17 16:03 ` Zdenek Dvorak
2009-11-17 16:14 ` Richard Guenther
2009-11-17 16:29 ` Zdenek Dvorak
2009-11-17 16:31 ` Richard Guenther
2009-11-17 16:51 ` Zdenek Dvorak
2009-10-30 15:55 ` m32c support for named addr spaces branch Ulrich Weigand
2009-10-16 23:57 ` DJ Delorie
2009-10-19 14:50 ` Ulrich Weigand
2009-10-29 18:37 ` [patch] Address-space-aware base registers (Re: m32c support for named addr spaces branch) Ulrich Weigand
2009-10-29 19:54 ` DJ Delorie
2009-10-29 20:18 ` DJ Delorie
2009-10-29 21:33 ` Ulrich Weigand
2009-10-29 22:50 ` DJ Delorie
2009-10-30 14:51 ` Ulrich Weigand
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=84fc9c000910190735k5bda29bav9002e1f011d0cec6@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=uweigand@de.ibm.com \
/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).