[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2012-05-07 Thread rguenth at gcc dot gnu.org
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.


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-25 Thread rguenth at gcc dot gnu.org
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?


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-25 Thread hubicka at ucw dot cz
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


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-16 Thread markus at trippelsdorf dot de
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:

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

2011-04-12  Richard Guenther  rguent...@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


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-16 Thread hubicka at gcc dot gnu.org
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 ---
Quickdirty 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));


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-15 Thread markus at trippelsdorf dot de
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...


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-14 Thread hubicka at gcc dot gnu.org
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.


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-14 Thread hubicka at gcc dot gnu.org
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


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-14 Thread hubicka at gcc dot gnu.org
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 ;)


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-14 Thread markus at trippelsdorf dot de
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


[Bug lto/50383] ICE in lto_symtab_register_decl, at lto-symtab.c:148

2011-09-13 Thread hubicka at gcc dot gnu.org
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...