------- Comment #2 from hjl dot tools at gmail dot com  2010-06-29 05:23 -------
[...@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]);
}
[...@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.
[...@gnu-34 delta]$ 


-- 


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

Reply via email to