public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "krebbel at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/55719] [4.8 Regression] ICE: Segmentation fault
Date: Thu, 10 Jan 2013 07:42:00 -0000 [thread overview]
Message-ID: <bug-55719-4-VAy6Wt8AlU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55719-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55719
Andreas Krebbel <krebbel at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |krebbel at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2013-01-10 07:41:46 UTC ---
(In reply to comment #5)
> I'm out of my depth here, but perhaps someone can give me a hint on how to
> debug this further.
>
> As alluded to earlier, this ICE only happens with sched-pressure scheduling.
>
> The actual ICE happens in find_reloads_address_part(), where we have are
> analyzing X=:
>
> (const:DI (plus:DI (symbol_ref:DI ("glob_b"))
> (const_int 3 [0x3])))
>
> prefer_reload_class() returns NO_REGS, because legitimate_reload_constant_p()
> returns false for the X above. So when we call force_const_mem() in
> find_reloads_address_part...
>
> if (CONSTANT_P (x)
> && (!targetm.legitimate_constant_p (mode, x)
> || targetm.preferred_reload_class (x, rclass) == NO_REGS))
> {
> x = force_const_mem (mode, x); <-- HERE
>
> force_const_mem() returns NULL because s390_cannot_force_const_mem() returns
> true for the SYMBOL_REF in -fPIC mode.
>
> Bottom line-- force_const_mem() returns NULL for a (const (plus SYMBOL_REF
> CONST)) with -fPIC, and then we dereference this NULL.
>
> Is the RTL correct?
>
> Any hints?
I'm already testing a patch. We have an instruction (larl) which is able to
handle pc-relative symbol references. But it only allows even addends. symref +
odd addend is handled via secondary reload. I think it is invalid that
preferred reload class returns NO_REGS here.
next prev parent reply other threads:[~2013-01-10 7:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 10:04 [Bug c/55719] New: " rguenth at gcc dot gnu.org
2012-12-17 10:05 ` [Bug c/55719] " rguenth at gcc dot gnu.org
2012-12-17 10:11 ` [Bug rtl-optimization/55719] " rguenth at gcc dot gnu.org
2012-12-17 10:28 ` rguenth at gcc dot gnu.org
2012-12-17 16:00 ` krebbel at gcc dot gnu.org
2013-01-07 15:37 ` rguenth at gcc dot gnu.org
2013-01-09 17:48 ` aldyh at gcc dot gnu.org
2013-01-09 18:46 ` aldyh at gcc dot gnu.org
2013-01-10 7:42 ` krebbel at gcc dot gnu.org [this message]
2013-01-10 7:56 ` krebbel at gcc dot gnu.org
2013-01-11 16:44 ` krebbel at gcc dot gnu.org
2013-01-11 16:46 ` krebbel 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-55719-4-VAy6Wt8AlU@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).