[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|9.3 |9.4

--- Comment #8 from Jakub Jelinek  ---
GCC 9.3.0 has been released, adjusting target milestone.

[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-01-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-01-15 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

--- Comment #7 from Martin Liška  ---
(In reply to Jan Hubicka from comment #6)
> Well, because the source files differs, the comdat group differs and the
> loosing one has fewer symbols in it.  So we end up keeping some symbols from
> the other comdat group that happens to have same name.  The compilation is
> bound to fail, so I guess question is how best to silence the ICE.  I
> suppose we may get around by dissoling comdat groups of all UNDEF symbols

Btw. is this a violation of ODR? Maybe, we could provide a warning for such a
situation?

[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

--- Comment #6 from Jan Hubicka  ---
Well, because the source files differs, the comdat group differs and the
loosing one has fewer symbols in it.  So we end up keeping some symbols from
the other comdat group that happens to have same name.  The compilation is
bound to fail, so I guess question is how best to silence the ICE.  I suppose
we may get around by dissoling comdat groups of all UNDEF symbols

[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

--- Comment #5 from Martin Liška  ---
Created attachment 47621
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47621=edit
Clean up test-case

So the now the diff of the source file is minimal:

$ diff -u 1.ii 2.ii
--- 1.ii2020-01-09 17:14:33.000405474 +0100
+++ 2.ii2020-01-09 17:14:33.000405474 +0100
@@ -79,7 +79,6 @@
 class ErrorHandler;
 class XMLEntityResolver;
 class XercesDOMParser : AbstractDOMParser {
-  virtual void error_that_causes_ice();
   bool expandSystemId(const unsigned short *, XMLBuffer &);
   EntityResolver *fEntityResolver;
   XMLEntityResolver *fXMLEntityResolver;
@@ -87,10 +86,4 @@
 };
 inline bool XercesDOMParser::expandSystemId(const unsigned short *,
 XMLBuffer &) { return false; }
-int *SGXMLScanner::resolveSystemId() {
-  unsigned short a;
-  XMLBuffer b;
-  fEntityHandler->expandSystemId(, b);
-  return 0;
-}
 } // namespace xercesc_2_7

Honza, does it explain now better?

[Bug lto/92600] [9/10 Regression] ICE: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline since r267359

2020-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600

Martin Liška  changed:

   What|Removed |Added

  Known to work||8.3.0
   Target Milestone|--- |9.3
Summary|ICE: symtab_node::verify|[9/10 Regression] ICE:
   |failed, building|symtab_node::verify failed,
   |523.xalancbmk_r with -flto  |building 523.xalancbmk_r
   |-fno-inline |with -flto -fno-inline
   ||since r267359
  Known to fail||10.0, 9.2.0

--- Comment #4 from Martin Liška  ---
(In reply to Martin Liška from comment #3)
> It's related to PR92599. It's also an ODR violation that leads to the ICE.

So it must be something different. There are source files which do not violate
ODR:

$ cat 1.ii
unsigned short a;
namespace xercesc_2_7 {
class MemoryManager;
class XMemory {};
class XMLErrorReporter {
  virtual void resetErrors();
};
class XMLBuffer {};
class XMLBufferMgr {
  unsigned fBufCount;
  MemoryManager *fMemoryManager;
  XMLBuffer **fBufList;
};
template  class RefVectorOf;
class XMLStringPool;
class GrammarResolver;
class XMLValidator;
template  class ValueStackOf;
class XMLEntityHandler;
class ErrorHandler;
class XMLScanner {
public:
  XMLEntityHandler *fEntityHandler;
};
class SGXMLScanner : XMLScanner {
  int *resolveSystemId();
};
class XMLDocumentHandler {
  virtual void endEntityReference();
};
class XMLEntityHandler {
public:
  virtual bool expandSystemId(const unsigned short *, XMLBuffer &);
};
class PSVIHandler {
  virtual void handleElementPSVI();
};
class DOMNode;
class DOMEntity;
class DocTypeHandler {
  virtual void startIntSubset();
};
class DOMDocumentImpl;
class DOMDocumentTypeImpl;
class XMLGrammarPool;
class AbstractDOMParser : XMemory,
  XMLDocumentHandler,
  XMLErrorReporter,
  XMLEntityHandler,
  DocTypeHandler,
  PSVIHandler {
  bool fCreateEntityReferenceNodes;
  bool fIncludeIgnorableWhitespace;
  bool fWithinElement;
  bool fParseInProgress;
  bool fCreateCommentNodes;
  bool fDocumentAdoptedByUser;
  bool fCreateSchemaInfo;
  XMLScanner *fScanner;
  unsigned short *fImplementationFeatures;
  DOMNode *fCurrentParent;
  DOMNode *fCurrentNode;
  DOMEntity *fCurrentEntity;
  DOMDocumentImpl *fDocument;
  ValueStackOf *fNodeStack;
  DOMDocumentTypeImpl *fDocumentType;
  RefVectorOf *fDocumentVector;
  GrammarResolver *fGrammarResolver;
  XMLStringPool *fURIStringPool;
  XMLValidator *fValidator;
  MemoryManager *fMemoryManager;
  XMLGrammarPool *fGrammarPool;
  XMLBufferMgr fBufMgr;
  XMLBuffer 
  PSVIHandler *fPSVIHandler;
};
class EntityResolver;
class XMLEntityResolver;
class XercesDOMParser : AbstractDOMParser {
  virtual void error();
  bool expandSystemId(const unsigned short *, XMLBuffer &);
  EntityResolver *fEntityResolver;
  XMLEntityResolver *fXMLEntityResolver;
  ErrorHandler *fErrorHandler;
};
inline bool XercesDOMParser::expandSystemId(const unsigned short *,
XMLBuffer &) { return false; }
int *SGXMLScanner::resolveSystemId() {
  XMLBuffer b;
  fEntityHandler->expandSystemId(, b);
  return 0;
}
} // namespace xercesc_2_7

$ cat 2.ii
namespace xercesc_2_7 {
class DOMNode;
class DOMEntity;
class MemoryManager;
class XMemory {};
class XMLErrorReporter {
public:
  virtual ~XMLErrorReporter();
};
template  class RefVectorOf;
class XMLDocumentHandler {
  virtual void XMLDecl();
};
class XMLBuffer;
class XMLEntityHandler {
  virtual bool expandSystemId(const unsigned short *, XMLBuffer &);
};
template  class ValueStackOf;
class GrammarResolver;
class XMLStringPool;
class DocTypeHandler {
public:
  virtual ~DocTypeHandler();
};
class XMLBufferMgr {
  unsigned fBufCount;
  MemoryManager *fMemoryManager;
  XMLBuffer **fBufList;
};
class PSVIHandler {
  virtual void handlePartialElementPSVI();
};
class XMLScanner;
class XMLValidator;
class DOMDocumentImpl;
class DOMDocumentTypeImpl;
class XMLGrammarPool;
class AbstractDOMParser : XMemory,
  XMLDocumentHandler,
  XMLErrorReporter,
  XMLEntityHandler,
  DocTypeHandler,
  PSVIHandler {
  bool fCreateEntityReferenceNodes;
  bool fIncludeIgnorableWhitespace;
  bool fWithinElement;
  bool fParseInProgress;
  bool fCreateCommentNodes;
  bool fDocumentAdoptedByUser;
  bool fCreateSchemaInfo;
  XMLScanner *fScanner;
  unsigned short *fImplementationFeatures;
  DOMNode *fCurrentParent;
  DOMNode *fCurrentNode;
  DOMEntity *fCurrentEntity;
  DOMDocumentImpl *fDocument;
  ValueStackOf *fNodeStack;
  DOMDocumentTypeImpl *fDocumentType;
  RefVectorOf *fDocumentVector;