public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148
@ 2011-09-13 14:48 hubicka at gcc dot gnu.org
  2011-09-13 14:58 ` [Bug lto/50383] " hubicka at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-13 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50383
           Summary: ICE in lto_symtab_register_decl, at lto-symtab.c:148
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hubicka@gcc.gnu.org


/abuild/jh/trunk-install/bin/g++  -fpermissive -std=c++0x -flto -r -fpermissive
-nostdlib  tt.ii


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
@ 2011-09-13 14:58 ` hubicka at gcc dot gnu.org
  2011-09-14  8:23 ` hubicka at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-13 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at suse dot de

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-13 14:48:55 UTC ---
Michael,
this seems to be yours area?  I am running delta, but not much progress so far.
We ICE on adding a function (operator new) w/o DECL_ASSEMBLER_NAME set.

This blocks libreoffice LTO now...


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
  2011-09-13 14:58 ` [Bug lto/50383] " hubicka at gcc dot gnu.org
@ 2011-09-14  8:23 ` hubicka at gcc dot gnu.org
  2011-09-14 11:54 ` hubicka at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-14  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-14 07:38:03 UTC ---
Created attachment 25267
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25267
somewhat reducted testcase.


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
  2011-09-13 14:58 ` [Bug lto/50383] " hubicka at gcc dot gnu.org
  2011-09-14  8:23 ` hubicka at gcc dot gnu.org
@ 2011-09-14 11:54 ` hubicka at gcc dot gnu.org
  2011-09-14 12:42 ` hubicka at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-14 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-14 11:32:47 UTC ---
Created attachment 25271
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25271
More reduced testcase


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-09-14 11:54 ` hubicka at gcc dot gnu.org
@ 2011-09-14 12:42 ` hubicka at gcc dot gnu.org
  2011-09-14 13:46 ` markus at trippelsdorf dot de
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-14 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25271|0                           |1
        is obsolete|                            |

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-14 11:53:29 UTC ---
Created attachment 25272
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25272
reduced testcase again ;)


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-09-14 12:42 ` hubicka at gcc dot gnu.org
@ 2011-09-14 13:46 ` markus at trippelsdorf dot de
  2011-09-15 22:07 ` markus at trippelsdorf dot de
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: markus at trippelsdorf dot de @ 2011-09-14 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-09-14 13:32:17 UTC ---
More reduced:

% cat test.cpp

typedef long unsigned int size_t;
extern "C" {
     typedef unsigned short sal_uInt16;
};
class Resource {
};
namespace com {
namespace sun {
namespace star {
namespace uno {
class BaseReference {
};
enum UnoReference_Query {
     UNO_QUERY, UNO_REF_QUERY
};
template < class interface_type >  class Reference:public BaseReference {
public:
     inline static void *operator  new (:: size_t nSize) {
     }
     inline Reference (const BaseReference & rRef, UnoReference_Query);
};
class Exception {
};
class XInterface {
};
}
}
}
}
class OutputDevice:public Resource {
};
class Window:public OutputDevice {
};
class SystemWindow:public Window {
};
class Dialog:public SystemWindow {
};
class ModalDialog:public Dialog {
};
class TabPage:public Window {
};
class SvListEntry {
};
class SvLBoxEntry:public SvListEntry {
};
namespace com {
namespace sun {
namespace star {
namespace beans {
class  XPropertySet:      public::com::sun::star::uno::XInterface {
};
}
namespace xforms {
class  XFormsUIHelper1:  public::com::sun::star::uno::XInterface {
};
class  XSubmission;
}
}
}
}
namespace svxform {
struct ItemNode;
typedef::com::sun::star::uno::Reference
<::com::sun::star::xforms::XFormsUIHelper1> XFormsUIHelper1_ref;
typedef::com::sun::star::uno::Reference <::com::sun::star::beans::XPropertySet>
XPropertySet_ref;
typedef::com::sun::star::uno::Reference <::com::sun::star::xforms::XSubmission>
XSubmission_ref;
class     XFormsPage: TabPage {
     XFormsUIHelper1_ref m_xUIHelper;
     bool DoToolBoxAction (sal_uInt16 _nToolBoxID);
     SvLBoxEntry *AddEntry (const XPropertySet_ref & _rPropSet);
     void EditEntry (const XPropertySet_ref & _rPropSet);
};
class AddSubmissionDialog: ModalDialog {
public:
     AddSubmissionDialog (Window *pParent, ItemNode *_pNode, const
XFormsUIHelper1_ref & _rUIHelper);
     XSubmission_ref &GetNewSubmission () const {
     }
};
}
using namespace::com::sun::star::beans;
using namespace::com::sun::star::uno;
namespace css =::com::sun::star;
namespace svxform {
bool XFormsPage::DoToolBoxAction (sal_uInt16 _nToolBoxID)
{
     switch (_nToolBoxID) {  
     case 12: {
          {
               AddSubmissionDialog aDlg (this, __null, m_xUIHelper);
               {
                    try {
                         Reference <css::xforms::XSubmission> xNewSubmission =
aDlg.GetNewSubmission ();
                         Reference < XPropertySet > xNewPropSet
(xNewSubmission, UNO_QUERY);
                         SvLBoxEntry *pEntry = AddEntry (xNewPropSet);
                    } catch (Exception &) {
                    }
               }
          }
     }
     }
}
SvLBoxEntry *XFormsPage::AddEntry (const Reference < XPropertySet > &_rEntry)
{
}
void XFormsPage::EditEntry (const Reference < XPropertySet > &_rEntry)
{
}
}

% g++ -o /dev/null -O0 -nostdlib -Wfatal-errors -fpreprocessed -fpermissive
-flto -w -r -fpermissive test.cpp
lto1: internal compiler error: in lto_symtab_register_decl, at lto-symtab.c:148


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-09-14 13:46 ` markus at trippelsdorf dot de
@ 2011-09-15 22:07 ` markus at trippelsdorf dot de
  2011-09-16  8:36 ` markus at trippelsdorf dot de
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: markus at trippelsdorf dot de @ 2011-09-15 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-09-15 21:39:06 UTC ---
Still further reduction:

class Resource {
};
class BaseReference {
};
template < class interface_type >  class Reference:public BaseReference {
public:
     void *operator new (int nSize) {
     }
     Reference (const BaseReference & rRef);
};
class Exception;
class XInterface;
class OutputDevice:public Resource {
};
class Window:public OutputDevice {
};
class SystemWindow:public Window {
};
class Dialog:public SystemWindow {
};
class ModalDialog:public Dialog {
};
class TabPage:public Window {
};
class SvListEntry;
class SvLBoxEntry;
class  XPropertySet;
class  XFormsUIHelper1;
class  XSubmission;
struct ItemNode;
typedef Reference <XFormsUIHelper1> XFormsUIHelper1_ref;
typedef Reference <XPropertySet> XPropertySet_ref;
typedef Reference <XSubmission> XSubmission_ref;
class     XFormsPage: TabPage {
     XFormsUIHelper1_ref m_xUIHelper;
     bool DoToolBoxAction (int _nToolBoxID);
     SvLBoxEntry *AddEntry (const XPropertySet_ref &_rPropSet);
};
class AddSubmissionDialog: ModalDialog {
public:
     AddSubmissionDialog (Window *pParent, ItemNode *_pNode, const
XFormsUIHelper1_ref & _rUIHelper);
     XSubmission_ref &GetNewSubmission () const {
     }
};
bool XFormsPage::DoToolBoxAction (int _nToolBoxID)
{
 AddSubmissionDialog aDlg (this, __null, m_xUIHelper);
 Reference <XSubmission> xNewSubmission = aDlg.GetNewSubmission ();
 Reference < XPropertySet > xNewPropSet (xNewSubmission);
 SvLBoxEntry *pEntry = AddEntry (xNewPropSet);
}
SvLBoxEntry *XFormsPage::AddEntry (const Reference <XPropertySet> &_rEntry)
{
}

When one replaces the third from last line with:
SvLBoxEntry *XFormsPage::AddEntry (const XPropertySet_ref &_rEntry)
the ICE goes away...


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-09-15 22:07 ` markus at trippelsdorf dot de
@ 2011-09-16  8:36 ` markus at trippelsdorf dot de
  2011-09-16  9:34 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: markus at trippelsdorf dot de @ 2011-09-16  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenther at suse dot de

--- Comment #7 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-09-16 08:20:16 UTC ---
Bisection points to:

39f59e656681b198dfb1947b70fdddd5d0dc4747 is the first bad commit
commit 39f59e656681b198dfb1947b70fdddd5d0dc4747
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Apr 12 10:44:15 2011 +0000

    2011-04-12  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/46076
        * gimple.h (struct gimple_statement_call): Add fntype field.
        (gimple_call_fntype): Adjust.
        (gimple_call_set_fntype): New function.
        * gimple.c (gimple_build_call_1): Set the call function type.
        * gimplify.c (gimplify_call_expr): Preserve the function
        type the frontend used for the call.
        (gimplify_modify_expr): Likewise.
        * lto-streamer-in.c (input_gimple_stmt): Input the call stmts
        function type.
        * lto-streamer-out.c (output_gimple_stmt): Output the call stmts
        function type.
        * tree-ssa.c (useless_type_conversion_p): Function pointer
        conversions are useless.

        * gcc.dg/tree-ssa/pr46076.c: Un-XFAIL.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172310
138bc75d-0d04-0410-961f-82ee72b054a4


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-09-16  8:36 ` markus at trippelsdorf dot de
@ 2011-09-16  9:34 ` hubicka at gcc dot gnu.org
  2011-09-25  9:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-09-16  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-09-16 08:33:30 UTC ---
Quick&dirty workaround for this problem:
Index: lto-symtab.c
===================================================================
--- lto-symtab.c        (revision 178757)
+++ lto-symtab.c        (working copy)
@@ -141,11 +141,14 @@ lto_symtab_register_decl (tree decl,
      properties inconsistent with having external linkage.  If any of
      these asertions fail, then the object file reader has failed to
      detect these cases and issue appropriate error messages.  */
-  gcc_assert (decl
+  if (decl
              && TREE_PUBLIC (decl)
              && (TREE_CODE (decl) == VAR_DECL
                  || TREE_CODE (decl) == FUNCTION_DECL)
-             && DECL_ASSEMBLER_NAME_SET_P (decl));
+             && DECL_ASSEMBLER_NAME_SET_P (decl))
+    ;
+  else
+    return;
   if (TREE_CODE (decl) == VAR_DECL
       && DECL_INITIAL (decl))
     gcc_assert (!DECL_EXTERNAL (decl)
@@ -781,6 +784,9 @@ lto_symtab_prevailing_decl (tree decl)
   if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
     return decl;

+  if (!DECL_ASSEMBLER_NAME_SET_P (decl))
+    return decl;
+
   /* Ensure DECL_ASSEMBLER_NAME will not set assembler name.  */
   gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl));


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-09-16  9:34 ` hubicka at gcc dot gnu.org
@ 2011-09-25  9:57 ` rguenth at gcc dot gnu.org
  2011-09-25 10:43 ` hubicka at ucw dot cz
  2012-05-07 12:58 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-25  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|rguenther at suse dot de    |rguenth at gcc dot gnu.org

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-25 09:52:12 UTC ---
So why doesn't it have DECL_ASSEMBLER_NAME set?


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-09-25  9:57 ` rguenth at gcc dot gnu.org
@ 2011-09-25 10:43 ` hubicka at ucw dot cz
  2012-05-07 12:58 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: hubicka at ucw dot cz @ 2011-09-25 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> 2011-09-25 10:12:47 UTC ---
> So why doesn't it have DECL_ASSEMBLER_NAME set?
No idea. I suppose it is not seen by free_lang_data for whatever reason.

Honza


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

* [Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148
  2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-09-25 10:43 ` hubicka at ucw dot cz
@ 2012-05-07 12:58 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 12:55:16 UTC ---
Works for me on the 4.7 branch.


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

end of thread, other threads:[~2012-05-07 12:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 14:48 [Bug lto/50383] New: ICE in lto_symtab_register_decl, at lto-symtab.c:148 hubicka at gcc dot gnu.org
2011-09-13 14:58 ` [Bug lto/50383] " hubicka at gcc dot gnu.org
2011-09-14  8:23 ` hubicka at gcc dot gnu.org
2011-09-14 11:54 ` hubicka at gcc dot gnu.org
2011-09-14 12:42 ` hubicka at gcc dot gnu.org
2011-09-14 13:46 ` markus at trippelsdorf dot de
2011-09-15 22:07 ` markus at trippelsdorf dot de
2011-09-16  8:36 ` markus at trippelsdorf dot de
2011-09-16  9:34 ` hubicka at gcc dot gnu.org
2011-09-25  9:57 ` rguenth at gcc dot gnu.org
2011-09-25 10:43 ` hubicka at ucw dot cz
2012-05-07 12:58 ` rguenth 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).