public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/43741]  New: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a
@ 2010-04-13  1:13 kkojima at gcc dot gnu dot org
  2010-04-13  1:16 ` [Bug target/43741] " kkojima at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2010-04-13  1:13 UTC (permalink / raw)
  To: gcc-bugs

Unified build on sh-unknown-elf with enabling c++ ICEs during
compiling libstdc++-v3/src/ios_init.cc with -m2a.  It starts
to fail my recent change

r158208 | kkojima | 2010-04-12 07:59:36 +0900 (Mon, 12 Apr 2010) | 7 lines

        * config/sh/sh-protos.h (sh_legitimize_reload_address): Declare.
        * config/sh/sh.c: Include reload.h.
        (sh_legitimize_reload_address): New.
        * config/sh/sh.h (LEGITIMIZE_RELOAD_ADDRESS): Use
        sh_legitimize_reload_address.


-- 
           Summary: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kkojima at gcc dot gnu dot org
GCC target triplet: sh-elf


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


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

* [Bug target/43741] sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a
  2010-04-13  1:13 [Bug target/43741] New: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a kkojima at gcc dot gnu dot org
@ 2010-04-13  1:16 ` kkojima at gcc dot gnu dot org
  2010-04-15  3:35 ` kkojima at gcc dot gnu dot org
  2010-04-17  3:54 ` kkojima at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2010-04-13  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kkojima at gcc dot gnu dot org  2010-04-13 01:16 -------
Created an attachment (id=20374)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20374&action=view)
a reduced test case

xxx.ii: In constructor 'std::ios_base::Init::Init()':
xxx.ii:161:3: error: insn does not satisfy its constraints:
(insn 284 282 285 6 xxx.ii:113 (set (reg:SI 1 r1)
        (reg/f:SI 319)) 176 {movsi_ie} (nil))
xxx.ii:161:3: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:396

which shows that the pseudo register remains after reload.
The .ira rtl dump looks that sh_legitimize_reload_address makes
a too complex reload for this case.  I've confirmed the patch
below fix the above failure.  I'll apply it if it survives
the usual tests and doesn't make the code quality worse with
CSiBE tests.

--- ORIG/trunk/gcc/config/sh/sh.c       2010-04-12 09:52:36.000000000 +0900
+++ trunk/gcc/config/sh/sh.c    2010-04-13 08:55:31.000000000 +0900
@@ -9649,8 +9649,7 @@ sh_legitimize_reload_address (rtx *p, en
          || XEXP (*p, 0) == hard_frame_pointer_rtx))
     {
       rtx index_rtx = XEXP (*p, 1);
-      HOST_WIDE_INT offset = INTVAL (index_rtx), offset_base;
-      rtx sum;
+      HOST_WIDE_INT offset = INTVAL (index_rtx);

       if (TARGET_SH2A && mode == DFmode && (offset & 0x7))
        {
@@ -9665,24 +9664,6 @@ sh_legitimize_reload_address (rtx *p, en
                       BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
          goto win;
        }
-      /* Instead of offset_base 128..131 use 124..127, so that
-        simple add suffices.  */
-      if (offset > 127)
-       offset_base = ((offset + 4) & ~60) - 4;
-      else
-       offset_base = offset & ~60;
-      /* Sometimes the normal form does not suit DImode.  We could avoid
-        that by using smaller ranges, but that would give less optimized
-        code when SImode is prevalent.  */
-      if (offset_base != 0
-         && GET_MODE_SIZE (mode) + offset - offset_base <= 64)
-       {
-         sum = gen_rtx_PLUS (Pmode, XEXP (*p, 0), GEN_INT (offset_base));
-         *p = gen_rtx_PLUS (Pmode, sum, GEN_INT (offset - offset_base));
-         push_reload (sum, NULL_RTX, &XEXP (*p, 0), NULL,
-                      BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
-         goto win;
-       }
     }
   /* We must re-recognize what we created before.  */
   else if (GET_CODE (*p) == PLUS


-- 


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


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

* [Bug target/43741] sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a
  2010-04-13  1:13 [Bug target/43741] New: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a kkojima at gcc dot gnu dot org
  2010-04-13  1:16 ` [Bug target/43741] " kkojima at gcc dot gnu dot org
@ 2010-04-15  3:35 ` kkojima at gcc dot gnu dot org
  2010-04-17  3:54 ` kkojima at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2010-04-15  3:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kkojima at gcc dot gnu dot org  2010-04-15 03:35 -------
I've noticed that I applied a wrong patch at revision 158208 and
it causes the problematic reload in the failed case.  I'll fix it.


-- 


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


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

* [Bug target/43741] sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a
  2010-04-13  1:13 [Bug target/43741] New: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a kkojima at gcc dot gnu dot org
  2010-04-13  1:16 ` [Bug target/43741] " kkojima at gcc dot gnu dot org
  2010-04-15  3:35 ` kkojima at gcc dot gnu dot org
@ 2010-04-17  3:54 ` kkojima at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2010-04-17  3:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kkojima at gcc dot gnu dot org  2010-04-17 03:54 -------
Fixed.


-- 

kkojima at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-04-17  3:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-13  1:13 [Bug target/43741] New: sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a kkojima at gcc dot gnu dot org
2010-04-13  1:16 ` [Bug target/43741] " kkojima at gcc dot gnu dot org
2010-04-15  3:35 ` kkojima at gcc dot gnu dot org
2010-04-17  3:54 ` kkojima at gcc dot gnu dot 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).