public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
@ 2012-06-29 21:29 tobias.han at gmx dot de
  2012-06-29 21:33 ` [Bug c++/53811] " tobias.han at gmx dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: tobias.han at gmx dot de @ 2012-06-29 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53811
           Summary: ICE: in insn_default_length, at
                    config/i386/i386.md:529 (unrecognizable insn) with
                    -mcmodel=large
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tobias.han@gmx.de
              Host: amd64
            Target: x86_64-linux-gnu


I get this ICE with the Debian gcc revision 4.7.0-8.

g++ -I../Engine -I../Common -I../Common/libinclude -mcmodel=large
-DTHIS_IS_THE_ENGINE -DLINUX_VERSION -c -o ac.o ac.cpp

ac.cpp:29287:1: error: unrecognizable insn:
(call_insn/j 3 2 4 (call (mem:QI (symbol_ref:DI ("*.LTHUNK0") [flags 0x3]
<function_decl 0x7ffff4dd8100 *.LTHUNK0>) [0 S1 A8])
        (const_int 0 [0])) -1
     (nil)
    (nil))
ac.cpp:29287:1: internal compiler error: in insn_default_length, at
config/i386/i386.md:529
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccpP8zhz.out file, please attach this to
your bugreport.


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

* [Bug c++/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
@ 2012-06-29 21:33 ` tobias.han at gmx dot de
  2012-07-01 15:40 ` [Bug target/53811] " ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobias.han at gmx dot de @ 2012-06-29 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Hansen <tobias.han at gmx dot de> 2012-06-29 21:32:47 UTC ---
Created attachment 27718
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27718
preprocessed source


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
  2012-06-29 21:33 ` [Bug c++/53811] " tobias.han at gmx dot de
@ 2012-07-01 15:40 ` ubizjak at gmail dot com
  2012-07-03 11:08 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-01 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-07-01
         AssignedTo|unassigned at gcc dot       |ubizjak at gmail dot com
                   |gnu.org                     |
   Target Milestone|---                         |4.7.2
     Ever Confirmed|0                           |1

--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-01 15:40:04 UTC ---
Can you please test following patch:

--cut here--
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 189101)
+++ config/i386/i386.c  (working copy)
@@ -33056,6 +33056,13 @@ x86_output_mi_thunk (FILE *file,
     emit_jump_insn (gen_indirect_jump (fnaddr));
   else
     {
+      if (!sibcall_insn_operand (fnaddr, Pmode))
+       {
+         tmp = gen_rtx_REG (Pmode, R10_REG);
+         emit_move_insn (tmp, fnaddr);
+         fnaddr = tmp;
+       }
+
       tmp = gen_rtx_MEM (QImode, fnaddr);
       tmp = gen_rtx_CALL (VOIDmode, tmp, const0_rtx);
       tmp = emit_call_insn (tmp);
--cut here--


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
  2012-06-29 21:33 ` [Bug c++/53811] " tobias.han at gmx dot de
  2012-07-01 15:40 ` [Bug target/53811] " ubizjak at gmail dot com
@ 2012-07-03 11:08 ` ubizjak at gmail dot com
  2012-07-03 11:13 ` tobias.han at gmx dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-03 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-07/msg00084.htm
                   |                            |l

--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-03 11:07:56 UTC ---
Patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00084.html


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (2 preceding siblings ...)
  2012-07-03 11:08 ` ubizjak at gmail dot com
@ 2012-07-03 11:13 ` tobias.han at gmx dot de
  2012-07-03 11:58 ` uros at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobias.han at gmx dot de @ 2012-07-03 11:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Hansen <tobias.han at gmx dot de> 2012-07-03 11:13:26 UTC ---
Sorry, I won't get around to compile gcc (never done that yet) and test it.


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (3 preceding siblings ...)
  2012-07-03 11:13 ` tobias.han at gmx dot de
@ 2012-07-03 11:58 ` uros at gcc dot gnu.org
  2012-07-04 12:07 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu.org @ 2012-07-03 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from uros at gcc dot gnu.org 2012-07-03 11:58:16 UTC ---
Author: uros
Date: Tue Jul  3 11:58:12 2012
New Revision: 189218

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189218
Log:
    PR target/53811
    * config/i386/i386.c (x86_output_mi_thunk): Check if fnaddr satisfies
    sibcall_insn_operand.  Move it to a temporary register if not.

testsuite/ChangLog:

    PR target/53811
    * g++.dg/other/pr53811.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/other/pr53811.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (4 preceding siblings ...)
  2012-07-03 11:58 ` uros at gcc dot gnu.org
@ 2012-07-04 12:07 ` dominiq at lps dot ens.fr
  2012-07-04 12:14 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-07-04 12:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-07-04 12:07:15 UTC ---
g++.dg/other/pr53811.C fails on x86_64-apple-darwin10 with -m64:

FAIL: g++.dg/other/pr53811.C -std=gnu++98 (internal compiler error)
FAIL: g++.dg/other/pr53811.C -std=gnu++98 (test for excess errors)
FAIL: g++.dg/other/pr53811.C -std=gnu++11 (internal compiler error)
FAIL: g++.dg/other/pr53811.C -std=gnu++11 (test for excess errors)

The ICE is

Excess errors:
/opt/gcc/work/gcc/testsuite/g++.dg/other/pr53811.C:29:1: error: insn does not
satisfy its constraints:
(insn 3 2 4 (set (reg:DI 59)
        (const:DI (unspec:DI [
                    (symbol_ref:DI ("_ZN12ScriptString12CreateStringEPKc")
[flags 0x403] <function_decl 0x142987100 CreateString>)
                ] UNSPEC_GOTOFF))) 62 {*movdi_internal_rex64}
     (nil))

Should I open a new PR?

Note that ' -mcmodel=large' seems to have issues on x86_64-apple-darwin10: see
pr50077.


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (5 preceding siblings ...)
  2012-07-04 12:07 ` dominiq at lps dot ens.fr
@ 2012-07-04 12:14 ` ubizjak at gmail dot com
  2012-07-06 10:00 ` uros at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 12:14:00 UTC ---
(In reply to comment #6)

> Should I open a new PR?

Yes, please. I will wait with the 4.7 backport until new PR resolves.

> Note that ' -mcmodel=large' seems to have issues on x86_64-apple-darwin10: see
> pr50077.

TBH, -mcmodel=large is currently an overkill, but fixes are fairly trivial
(pushing address to temporary reg).


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (6 preceding siblings ...)
  2012-07-04 12:14 ` ubizjak at gmail dot com
@ 2012-07-06 10:00 ` uros at gcc dot gnu.org
  2012-07-10 17:54 ` uros at gcc dot gnu.org
  2012-07-10 17:56 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu.org @ 2012-07-06 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from uros at gcc dot gnu.org 2012-07-06 10:00:20 UTC ---
Author: uros
Date: Fri Jul  6 10:00:11 2012
New Revision: 189315

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189315
Log:
    PR target/53811
    * config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model,
    emit PIC sequence for fnaddr symbol reference in advance.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (7 preceding siblings ...)
  2012-07-06 10:00 ` uros at gcc dot gnu.org
@ 2012-07-10 17:54 ` uros at gcc dot gnu.org
  2012-07-10 17:56 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: uros at gcc dot gnu.org @ 2012-07-10 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from uros at gcc dot gnu.org 2012-07-10 17:53:53 UTC ---
Author: uros
Date: Tue Jul 10 17:53:48 2012
New Revision: 189412

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189412
Log:
    Backport from mainline
    2012-07-03  Uros Bizjak  <ubizjak@gmail.com>

    PR target/53811
    * config/i386/i386.c (x86_output_mi_thunk): Check if fnaddr satisfies
    sibcall_insn_operand.  Move it to a temporary register if not.

    2012-07-06  Uros Bizjak  <ubizjak@gmail.com>

    PR target/53853
    * config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model,
    emit PIC sequence for fnaddr symbol reference in advance.

testsuite/ChangeLog:

    Backport from mainline
    2012-07-03  Uros Bizjak  <ubizjak@gmail.com>

    PR target/53811
    * g++.dg/other/pr53811.C: New test.


Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/other/pr53811.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config/i386/i386.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large
  2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
                   ` (8 preceding siblings ...)
  2012-07-10 17:54 ` uros at gcc dot gnu.org
@ 2012-07-10 17:56 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-10 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

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

--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-10 17:56:05 UTC ---
Fixed.


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

end of thread, other threads:[~2012-07-10 17:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-29 21:29 [Bug c++/53811] New: ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large tobias.han at gmx dot de
2012-06-29 21:33 ` [Bug c++/53811] " tobias.han at gmx dot de
2012-07-01 15:40 ` [Bug target/53811] " ubizjak at gmail dot com
2012-07-03 11:08 ` ubizjak at gmail dot com
2012-07-03 11:13 ` tobias.han at gmx dot de
2012-07-03 11:58 ` uros at gcc dot gnu.org
2012-07-04 12:07 ` dominiq at lps dot ens.fr
2012-07-04 12:14 ` ubizjak at gmail dot com
2012-07-06 10:00 ` uros at gcc dot gnu.org
2012-07-10 17:54 ` uros at gcc dot gnu.org
2012-07-10 17:56 ` 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).