public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
@ 2012-11-24 21:37 zsojka at seznam dot cz
  2012-11-25 15:55 ` [Bug rtl-optimization/55458] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2012-11-24 21:37 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55458
           Summary: [4.8 Regression] ICE: in assign_by_spills, at
                    lra-assigns.c:1212 with -fPIC -m32 and simple asm
                    volatile
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28767
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28767
reduced testcase

Compiler output:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-193712-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-193712-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.8.0 20121121 (experimental) (GCC) 

$ gcc -fPIC -m32 testcase.c         
testcase.c: In function 'foo':
testcase.c:7:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1212
 }
 ^
0x8e29a1 assign_by_spills
        /mnt/svn/gcc-trunk/gcc/lra-assigns.c:1212
0x8e493b lra_assign()
        /mnt/svn/gcc-trunk/gcc/lra-assigns.c:1364
0x8e05dd lra(_IO_FILE*)
        /mnt/svn/gcc-trunk/gcc/lra.c:2298
0x896aa8 do_reload
        /mnt/svn/gcc-trunk/gcc/ira.c:4624
0x896aa8 rest_of_handle_reload
        /mnt/svn/gcc-trunk/gcc/ira.c:4737
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

I don't have a x86 compiler, so I don't know if this ICEs the same way on an
x86.


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

* [Bug rtl-optimization/55458] [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
  2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
@ 2012-11-25 15:55 ` rguenth at gcc dot gnu.org
  2012-11-27 22:01 ` vmakarov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-25 15:55 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug rtl-optimization/55458] [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
  2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
  2012-11-25 15:55 ` [Bug rtl-optimization/55458] " rguenth at gcc dot gnu.org
@ 2012-11-27 22:01 ` vmakarov at gcc dot gnu.org
  2012-11-27 22:03 ` vmakarov at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2012-11-27 22:01 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2012-11-27 22:01:22 UTC ---
Author: vmakarov
Date: Tue Nov 27 22:01:14 2012
New Revision: 193871

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193871
Log:
2012-11-27  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/55458
    * lra-assigns.c: Include rtl-error.h.
    (assign_by_spills): Report about asm inpossible constraints.
    * Makefile.in (lra-assigns.c): Add $(RTL_ERROR_H).

2012-11-27  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/55458
    * gcc.target/i386/pr55458.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr55458.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/lra-assigns.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/55458] [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
  2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
  2012-11-25 15:55 ` [Bug rtl-optimization/55458] " rguenth at gcc dot gnu.org
  2012-11-27 22:01 ` vmakarov at gcc dot gnu.org
@ 2012-11-27 22:03 ` vmakarov at redhat dot com
  2012-12-07 10:29 ` rguenth at gcc dot gnu.org
  2014-10-13 17:27 ` kyukhin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: vmakarov at redhat dot com @ 2012-11-27 22:03 UTC (permalink / raw)
  To: gcc-bugs


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

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #2 from Vladimir Makarov <vmakarov at redhat dot com> 2012-11-27 22:03:04 UTC ---
  Reload also can not compile the test.  But at least it gives a meaningful
error.
The problem that asm insns needs 6 reload regs and there is only 5 of them (one
is reserved for PIC and sp is always reserved).   Optimizations make asm insn
requiring only 3 regs.

  I've just submitted the patch reporting error as reload reports.  In any
case, I wanted to add this code for some time.


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

* [Bug rtl-optimization/55458] [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
  2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-11-27 22:03 ` vmakarov at redhat dot com
@ 2012-12-07 10:29 ` rguenth at gcc dot gnu.org
  2014-10-13 17:27 ` kyukhin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-07 10:29 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-07 10:28:51 UTC ---
Fixed then, I assume.


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

* [Bug rtl-optimization/55458] [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile
  2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-12-07 10:29 ` rguenth at gcc dot gnu.org
@ 2014-10-13 17:27 ` kyukhin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-10-13 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Mon Oct 13 17:26:49 2014
New Revision: 216154

URL: https://gcc.gnu.org/viewcvs?rev=216154&root=gcc&view=rev
Log:

gcc/
    PR target/8340
    PR middle-end/47602
    PR rtl-optimization/55458
    * config/i386/i386.c (ix86_use_pseudo_pic_reg): New.
    (ix86_init_pic_reg): New.
    (ix86_select_alt_pic_regnum): Add check on pseudo register.
    (ix86_save_reg): Likewise.
    (ix86_expand_prologue): Remove PIC register initialization
    now performed in ix86_init_pic_reg.
    (ix86_output_function_epilogue): Add check on pseudo register.
    (set_pic_reg_ever_alive): New.
    (legitimize_pic_address): Replace df_set_regs_ever_live with new
    set_pic_reg_ever_alive.
    (legitimize_tls_address): Likewise.
    (ix86_pic_register_p): New check.
    (ix86_delegitimize_address): Add check on pseudo register.
    (ix86_expand_call): Insert move from pseudo PIC register to ABI
    defined REAL_PIC_OFFSET_TABLE_REGNUM.
    (TARGET_INIT_PIC_REG): New.
    (TARGET_USE_PSEUDO_PIC_REG): New.
    * config/i386/i386.h (PIC_OFFSET_TABLE_REGNUM): Return INVALID_REGNUM
    if pic_offset_table_rtx exists.
    * doc/tm.texi.in (TARGET_USE_PSEUDO_PIC_REG, TARGET_INIT_PIC_REG):
    Document.
    * doc/tm.texi: Regenerate.
    * function.c (assign_parms): Generate pseudo register for PIC.
    * init-regs.c (initialize_uninitialized_regs): Ignor pseudo PIC
    register.
    * ira-color.c (color_pass): Add check on pseudo register.
    * ira-emit.c (change_loop): Don't create copies for PIC pseudo
    register.
    * ira.c (split_live_ranges_for_shrink_wrap): Add check on pseudo
    register.
    (ira): Add target specific PIC register initialization.
    (do_reload): Keep PIC pseudo register.
    * lra-assigns.c (spill_for): Add checks on pseudo register.
    * lra-constraints.c (contains_symbol_ref_p): New.
    (lra_constraints): Enable lra risky transformations when PIC is pseudo
    register.
    * shrink-wrap.c (try_shrink_wrapping): Add check on pseudo register.
    * target.def (use_pseudo_pic_reg): New.
    (init_pic_reg): New.

gcc/testsuite/
    PR target/8340
    PR middle-end/47602
    PR rtl-optimization/55458
    * gcc.target/i386/pic-1.c: Remove dg-error as test should pass now.
    * gcc.target/i386/pr55458.c: Likewise.
    * gcc.target/i386/pr47602.c: New.
    * gcc.target/i386/pr23098.c: Move to XFAIL.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.h
    trunk/gcc/doc/tm.texi
    trunk/gcc/doc/tm.texi.in
    trunk/gcc/function.c
    trunk/gcc/init-regs.c
    trunk/gcc/ira-color.c
    trunk/gcc/ira-emit.c
    trunk/gcc/ira.c
    trunk/gcc/lra-assigns.c
    trunk/gcc/lra-constraints.c
    trunk/gcc/shrink-wrap.c
    trunk/gcc/target.def
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/pic-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr23098.c
    trunk/gcc/testsuite/gcc.target/i386/pr55458.c


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

end of thread, other threads:[~2014-10-13 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-24 21:37 [Bug rtl-optimization/55458] New: [4.8 Regression] ICE: in assign_by_spills, at lra-assigns.c:1212 with -fPIC -m32 and simple asm volatile zsojka at seznam dot cz
2012-11-25 15:55 ` [Bug rtl-optimization/55458] " rguenth at gcc dot gnu.org
2012-11-27 22:01 ` vmakarov at gcc dot gnu.org
2012-11-27 22:03 ` vmakarov at redhat dot com
2012-12-07 10:29 ` rguenth at gcc dot gnu.org
2014-10-13 17:27 ` kyukhin at gcc dot gnu.org

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