Bug 44706 - [4.6 regression] Failed to build 483.xalancbmk in SPEC CPU 2006
Summary: [4.6 regression] Failed to build 483.xalancbmk in SPEC CPU 2006
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 03:57 UTC by H.J. Lu
Modified: 2010-07-01 15:44 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2010-06-29 03:57:44 UTC
On Linux/x86-64, revision 161503 gave

[hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/svn/gcc-test/usr/bin/gcc  -DSPEC_CPU -DNDEBUG  -DAPP_NO_THREADS -DXALAN_INMEM_MSG_LOADER -I. -Ixercesc -Ixercesc/dom -Ixercesc/dom/impl -Ixercesc/sax -Ixercesc/util/MsgLoaders/InMemory -Ixercesc/util/Transcoders/Iconv -Ixalanc/include -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER  -O2 -ffast-math    -DSPEC_CPU_LP64  -DSPEC_CPU_LINUX     DTDAttDefList.cpp -S       
DTDAttDefList.cpp: In member function \u2018virtual xercesc_2_5::XMLAttDef& xercesc_2_5::DTDAttDefList::getAttDef(unsigned int)\u2019:
DTDAttDefList.cpp:206:12: internal compiler error: tree check: expected var_decl or parm_decl, have result_decl in expand_one_var, at cfgexpand.c:967
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-27 build_base_o3.0000]$ 

Revision 161485 is OK.
Comment 1 H.J. Lu 2010-06-29 04:39:03 UTC
This is caused by revision 161500:

http://gcc.gnu.org/ml/gcc-cvs/2010-06/msg01418.html
Comment 2 H.J. Lu 2010-06-29 05:23:56 UTC
[hjl@gnu-34 delta]$ cat testcase.cc
class MemoryManager;
class XMLExcepts {
public : 
    enum Codes     {
      AttrList_BadIndex
    };
};
class XMLException {
public:
    XMLException(const char* const srcFile, const unsigned int srcLine, MemoryManager* const memoryManager = 0);
};
class ArrayIndexOutOfBoundsException : public XMLException {
public:
    ArrayIndexOutOfBoundsException(const char* const srcFile , const unsigned int srcLine , const XMLExcepts::Codes toThrow , MemoryManager* memoryManager = 0) : XMLException(srcFile, srcLine, memoryManager) {
    }
};
class XMLAttDef {
  bool fExternalAttribute;
};
class XMLAttDefList {
public:
    MemoryManager* getMemoryManager() const;
};
class DTDAttDef : public XMLAttDef {
};
class DTDAttDefList : public XMLAttDefList {
  virtual const XMLAttDef &getAttDef(unsigned int index) const ;
  DTDAttDef** fArray;
  unsigned int fCount;
};
const XMLAttDef &DTDAttDefList::getAttDef(unsigned int index) const {
  if(index >= fCount) 
    throw ArrayIndexOutOfBoundsException("foo.cpp", 0, XMLExcepts::AttrList_BadIndex, getMemoryManager());
  return *(fArray[index]);
}
[hjl@gnu-34 delta]$ /export/build/gnu/gcc/release/usr/gcc-4.6.0/bin/gcc -S -O2 testcase.cc
testcase.cc: In member function \u2018virtual const XMLAttDef& DTDAttDefList::getAttDef(unsigned int) const\u2019:
testcase.cc:31:18: internal compiler error: tree check: expected var_decl or parm_decl, have result_decl in expand_one_var, at cfgexpand.c:967
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-34 delta]$ 
Comment 3 H.J. Lu 2010-07-01 15:44:24 UTC
Fixed as of revision 161653.
Comment 4 Jan Hubicka 2010-07-02 09:40:07 UTC
Subject: Bug 44706

Author: hubicka
Date: Fri Jul  2 09:39:54 2010
New Revision: 161691

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161691
Log:

	PR middle-end/44706
	* predict.c (predict_paths_for_bb): Handle case when control dependence
	BB has only abnormal edges.
	* g++.dg/tree-ssa/pr44706.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr44706.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/predict.c
    trunk/gcc/testsuite/ChangeLog