public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c
@ 2013-01-27 12:26 olegendo at gcc dot gnu.org
  2013-01-27 15:44 ` [Bug target/56121] " olegendo at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-27 12:26 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56121
           Summary: [SH] ICE in libgcc/unwind-dw2.c
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: olegendo@gcc.gnu.org
            Target: sh*-*-*


When building an SH cross compiler the following error occurs:

../../../../gcc-trunk2/libgcc/unwind-dw2.c: In function 'execute_stack_op':
../../../../gcc-trunk2/libgcc/unwind-dw2.c:902:1: error: unable to generate
reloads for:
 }
 ^
(insn 747 746 748 61 (set (reg:SI 147 t)
        (zero_extract:SI (reg:SI 621 [ MEM[(struct _Unwind_Context
*)context_25(D) + 640B] ])
            (const_int 1 [0x1])
            (const_int 30 [0x1e])))
../../../../gcc-trunk2/libgcc/unwind-dw2.c:211 496 {bld_reg}
     (expr_list:REG_DEAD (reg:SI 621 [ MEM[(struct _Unwind_Context
*)context_25(D) + 640B] ])
        (nil)))
../../../../gcc-trunk2/libgcc/unwind-dw2.c:902:1: internal compiler error: in
find_reloads, at reload.c:3877
0x85338c7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
    ../../gcc-trunk2/gcc/rtl-error.c:109
0x851b374 find_reloads(rtx_def*, int, int, int, short*)
    ../../gcc-trunk2/gcc/reload.c:3877
0x8524668 calculate_needs_all_insns
    ../../gcc-trunk2/gcc/reload1.c:1520
0x8529038 reload(rtx_def*, int)
    ../../gcc-trunk2/gcc/reload1.c:941
0x8444925 do_reload
    ../../gcc-trunk2/gcc/ira.c:4635
0x8444925 rest_of_handle_reload
    ../../gcc-trunk2/gcc/ira.c:4736
Please submit a full bug report,

It seems this happens when compiling libgcc for SH2A.


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

* [Bug target/56121] [SH] ICE in libgcc/unwind-dw2.c
  2013-01-27 12:26 [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c olegendo at gcc dot gnu.org
@ 2013-01-27 15:44 ` olegendo at gcc dot gnu.org
  2013-01-27 16:24 ` olegendo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-27 15:44 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|sh*-*-*                     |sh2a-*-*

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-27 15:44:23 UTC ---
This is an SH2A specific problem.
If I understand correctly, in this case two reloads for the failing bld_reg
insn are required, one for operands[0] and one for operands[1].
Applying the following:

Index: gcc/config/sh/sh.md
===================================================================
--- gcc/config/sh/sh.md    (revision 195493)
+++ gcc/config/sh/sh.md    (working copy)
@@ -13236,7 +13236,7 @@
     (zero_extract:SI (match_operand:SI 0 "arith_reg_operand" "r")
              (const_int 1)
              (match_operand 1 "const_int_operand" "K03")))]
-  "TARGET_SH2A"
+  "TARGET_SH2A && satisfies_constraint_K03 (operands[1])"
   "bld    %1,%0")

 (define_insn "*bld_regqi"

fixes the problem.  However, there are more insns of this type that might be
fail and probably should be modified as well...


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

* [Bug target/56121] [SH] ICE in libgcc/unwind-dw2.c
  2013-01-27 12:26 [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c olegendo at gcc dot gnu.org
  2013-01-27 15:44 ` [Bug target/56121] " olegendo at gcc dot gnu.org
@ 2013-01-27 16:24 ` olegendo at gcc dot gnu.org
  2013-01-29 20:29 ` olegendo at gcc dot gnu.org
  2013-01-29 20:33 ` olegendo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-27 16:24 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-27 16:24:31 UTC ---
Created attachment 29286
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29286
Proposed patch

With this patch applied, at least 'make all' completes without errors.


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

* [Bug target/56121] [SH] ICE in libgcc/unwind-dw2.c
  2013-01-27 12:26 [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c olegendo at gcc dot gnu.org
  2013-01-27 15:44 ` [Bug target/56121] " olegendo at gcc dot gnu.org
  2013-01-27 16:24 ` olegendo at gcc dot gnu.org
@ 2013-01-29 20:29 ` olegendo at gcc dot gnu.org
  2013-01-29 20:33 ` olegendo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-29 20:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-29 20:29:34 UTC ---
Author: olegendo
Date: Tue Jan 29 20:29:29 2013
New Revision: 195558

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195558
Log:
    PR target/56121
    * config/sh/sh.md (bclr_m2a, bset_m2a, bst_m2a, bld_m2a, bldsign_m2a,
    bld_reg, *bld_regqi, band_m2a, bandreg_m2a, bor_m2a, borreg_m2a,
    bxor_m2a, bxorreg_m2a): Add satisfies_constraint_K03 condition.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.md


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

* [Bug target/56121] [SH] ICE in libgcc/unwind-dw2.c
  2013-01-27 12:26 [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c olegendo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-01-29 20:29 ` olegendo at gcc dot gnu.org
@ 2013-01-29 20:33 ` olegendo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-29 20:33 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

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

--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-29 20:33:19 UTC ---
Fixed in 4.8.


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

end of thread, other threads:[~2013-01-29 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-27 12:26 [Bug target/56121] New: [SH] ICE in libgcc/unwind-dw2.c olegendo at gcc dot gnu.org
2013-01-27 15:44 ` [Bug target/56121] " olegendo at gcc dot gnu.org
2013-01-27 16:24 ` olegendo at gcc dot gnu.org
2013-01-29 20:29 ` olegendo at gcc dot gnu.org
2013-01-29 20:33 ` olegendo 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).