1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-fnsplit" } */
12 XMLException(const char* const srcFile, const unsigned int srcLine,
13 MemoryManager* const memoryManager = 0);
15 class ArrayIndexOutOfBoundsException : public XMLException {
17 ArrayIndexOutOfBoundsException(const char* const srcFile , const unsigned
18 int srcLine , const XMLExcepts::Codes toThrow , MemoryManager* memoryManager =
19 0) : XMLException(srcFile, srcLine, memoryManager) {
23 bool fExternalAttribute;
27 MemoryManager* getMemoryManager() const;
29 class DTDAttDef : public XMLAttDef {
31 class DTDAttDefList : public XMLAttDefList {
32 virtual const XMLAttDef &getAttDef(unsigned int index) const ;
36 const XMLAttDef &DTDAttDefList::getAttDef(unsigned int index) const {
38 throw ArrayIndexOutOfBoundsException("foo.cpp", 0,
39 XMLExcepts::AttrList_BadIndex, getMemoryManager());
40 return *(fArray[index]);
43 /* Mistake in branch prediction caused us to split away real body of the function keeping
44 only throw () invokation. This is bad idea. */
45 /* { dg-final { scan-tree-dump-not "Splitting function" "fnsplit"} } */
46 /* { dg-final { cleanup-tree-dump "fnsplit" } } */