public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/49721] convert_memory_address_addr_space may generate invalid new insns
Date: Thu, 29 May 2014 16:01:00 -0000	[thread overview]
Message-ID: <bug-49721-4-fWZzERyBK9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49721-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49721

--- Comment #28 from H.J. Lu <hjl.tools at gmail dot com> ---

(In reply to Andrew Pinski from comment #27)
> This patch breaks ILP32 with stack pointers.
> For this function:
> void f(int *a, int b, long long d) __attribute__((noinline,noclone));
> void f(int *a, int b, long long d)
> {
>    if((0x6ffffeff - b) < 11)
>      a[(0x6ffffeff - b) +34+0+16+3+12] = d;
> }
> 
> If a is 0xfffefe90 we get an invalid overflow.  We have the following RTL to
> begin with:
> (plus:SI (plus:SI (mult:SI (reg/v:SI 80 [ b ])
>             (const_int -4 [0xfffffffffffffffc]))
>         (subreg/s/u:SI (reg/v/f:DI 79 [ a ]) 0))
>     (const_int -1073742592 [0xffffffffbffffd00]))
> 
> And we decide to put the constant in DImode rather than SImode.

There is an address overflow and you want to truncate it to 32-bit.
I am not sure if it is defined.


  parent reply	other threads:[~2014-05-29 16:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 19:14 [Bug middle-end/49721] New: " hjl.tools at gmail dot com
2011-07-28 21:11 ` [Bug middle-end/49721] " hjl.tools at gmail dot com
2011-07-28 21:28 ` hjl.tools at gmail dot com
2011-07-28 21:31 ` pinskia at gcc dot gnu.org
2011-07-28 21:40 ` hjl.tools at gmail dot com
2011-08-02 14:17 ` hjl.tools at gmail dot com
2011-08-02 15:40 ` ubizjak at gmail dot com
2011-08-02 15:57 ` hjl.tools at gmail dot com
2011-08-02 15:59 ` hjl.tools at gmail dot com
2011-08-02 18:36 ` ubizjak at gmail dot com
2011-08-02 19:18 ` hjl.tools at gmail dot com
2011-08-02 19:19 ` ubizjak at gmail dot com
2011-08-02 19:29 ` hjl.tools at gmail dot com
2011-08-02 19:33 ` ubizjak at gmail dot com
2011-08-02 19:42 ` hjl.tools at gmail dot com
2011-08-02 20:22 ` ubizjak at gmail dot com
2011-08-03  2:40 ` hjl.tools at gmail dot com
2011-08-03  6:33 ` bonzini at gnu dot org
2011-08-03  6:41 ` ubizjak at gmail dot com
2011-08-03  6:48 ` ubizjak at gmail dot com
2011-08-03 13:57 ` hjl.tools at gmail dot com
2011-08-03 14:07 ` ubizjak at gmail dot com
2011-08-03 14:49 ` hjl.tools at gmail dot com
2011-08-09 13:23 ` hjl at gcc dot gnu.org
2011-08-09 13:24 ` hjl at gcc dot gnu.org
2011-08-18 22:43 ` hjl.tools at gmail dot com
2011-08-19 21:20 ` hjl at gcc dot gnu.org
2014-05-29  4:35 ` pinskia at gcc dot gnu.org
2014-05-29 16:01 ` hjl.tools at gmail dot com [this message]
2014-05-30  2:17 ` pinskia at gcc dot gnu.org
2014-05-30 20:51 ` pinskia at gcc dot gnu.org
2014-05-30 21:29 ` hjl.tools at gmail dot com
2014-05-30 22:47 ` pinskia at gcc dot gnu.org
2014-05-30 22:52 ` pinskia at gcc dot gnu.org
2014-10-15  0:38 ` pinskia at gcc dot gnu.org
2014-11-13 14:01 ` yroux at gcc dot gnu.org
2014-11-23  4:13 ` pinskia 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-49721-4-fWZzERyBK9@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).