public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63824] New: [5.0 Regression]: ICE with -mcmodel=large -fpic and pseudo PIC
@ 2014-11-11 18:17 ubizjak at gmail dot com
  2014-11-11 18:20 ` [Bug target/63824] " ubizjak at gmail dot com
  2014-11-11 18:35 ` ubizjak at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: ubizjak at gmail dot com @ 2014-11-11 18:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63824
           Summary: [5.0 Regression]: ICE with -mcmodel=large -fpic and
                    pseudo PIC
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com

This ICE can be seen in [1] as FAIL: g++.dg/other/pr53811.C on Darwin, but can
be triggered also on x86_64 linux with -mcmodel=large -fpic

The problem starts in x86_output_mi_thunk, where we have:

      if (ix86_cmodel == CM_LARGE_PIC && SYMBOLIC_CONST (fnaddr))
    fnaddr = legitimize_pic_address (fnaddr,
                     gen_rtx_REG (Pmode, tmp_regno));

and legitimize_pic_address does:

13537         if (reg != 0)
13538           {
13539             new_rtx = expand_simple_binop (Pmode, PLUS, reg,
pic_offset_table_rtx,
13540                                            tmpreg, 1, OPTAB_DIRECT);
13541             new_rtx = reg;
13542           }

Please note that x86_output_mi_thunk runs after reload, and the above code
emits RTX with a pseudo pic_offset_table_rtx register.

[1] https://gcc.gnu.org/ml/gcc-testresults/2014-11/msg01024.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-11 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-11 18:17 [Bug target/63824] New: [5.0 Regression]: ICE with -mcmodel=large -fpic and pseudo PIC ubizjak at gmail dot com
2014-11-11 18:20 ` [Bug target/63824] " ubizjak at gmail dot com
2014-11-11 18:35 ` ubizjak at gmail dot com

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).