public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sje at cup dot hp dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/44790] Bootstrap fails after MEM-REF merge
Date: Fri, 02 Jul 2010 19:49:00 -0000	[thread overview]
Message-ID: <20100702194924.3862.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44790-3107@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from sje at cup dot hp dot com  2010-07-02 19:49 -------
This may be related to &x + CST folding.  The bug only happens at -O1 or above.
I think I forgot to mention that in the original bug report.
When I look at the expand dump and the comparision to 123 I see:


(insn 17 16 18 3 x.c:8 (set (reg:DI 348)
        (zero_extend:DI (subreg/s/v:SI (reg/v/f:DI 339 [ ap+-4 ]) 4))) -1
(nil))

(insn 18 17 19 3 x.c:8 (set (reg/f:DI 347)
        (plus:DI (reg:DI 348)
            (const_int 4 [0x4]))) -1 (nil))

(insn 19 18 20 3 x.c:9 (set (reg:SI 349)
        (mem:SI (reg/f:DI 347) [0 MEM[(int *)ap_1 + 4B]+0 S4 A32])) -1 (nil))

(insn 20 19 21 3 x.c:9 (set (reg:BI 350)
        (eq:BI (reg:SI 349)
            (const_int 123 [0x7b]))) -1 (nil))

Instruction 17, where we set r348 to zero_extend of r339 looks wrong.  We
need to do a pointer extend here, I.e. (unspec 24) go generate an addp4.
r349 is not a valid pointer after instruction 17 and this generates the fault.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44790


  reply	other threads:[~2010-07-02 19:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 18:53 [Bug middle-end/44790] New: " sje at cup dot hp dot com
2010-07-02 19:49 ` sje at cup dot hp dot com [this message]
2010-07-03 11:17 ` [Bug middle-end/44790] " rguenth at gcc dot gnu dot org
2010-07-06 14:26 ` [Bug middle-end/44790] [4.6 Regression] " rguenth at gcc dot gnu dot org
2010-07-06 16:44 ` sje at cup dot hp dot com
2010-07-06 22:56 ` sje at cup dot hp dot com
2010-07-07  8:35 ` rguenther at suse dot de
2010-07-07 12:44 ` rguenth at gcc dot gnu dot org
2010-07-07 13:04 ` rguenth at gcc dot gnu dot org
2010-07-28  7:45 ` ebotcazou 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=20100702194924.3862.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).