diff -r -u dragonegg-2.9/src/Convert.cpp dragonegg-vs-2.9/src/Convert.cpp --- dragonegg-2.9/src/Convert.cpp 2011-04-12 13:54:40.358482000 +0200 +++ dragonegg-vs-2.9/src/Convert.cpp 2011-04-12 15:03:31.725594580 +0200 @@ -902,6 +902,7 @@ } // Add the operands to the phi node. + P.PHI->reserveOperandSpace(PhiArguments.size()); for (ValueVector::iterator I = PhiArguments.begin(), E = PhiArguments.end(); I != E; ++I) P.PHI->addIncoming(I->second, I->first); @@ -1097,7 +1098,7 @@ // Create the LLVM phi node. const Type *Ty = GetRegType(TREE_TYPE(gimple_phi_result(gcc_phi))); - PHINode *PHI = Builder.CreatePHI(Ty, gimple_phi_num_args(gcc_phi)); + PHINode *PHI = Builder.CreatePHI(Ty); // The phi defines the associated ssa name. tree name = gimple_phi_result(gcc_phi); @@ -1955,8 +1956,8 @@ if (InVal == 0) { // Different unwind edges have different values. Create a new PHI node // in LPad. - PHINode *NewPN = PHINode::Create(PN->getType(), std::distance(PB, PE), - PN->getName()+".lpad", LPad); + PHINode *NewPN = PHINode::Create(PN->getType(), PN->getName()+".lpad", + LPad); // Add an entry for each unwind edge, using the value from the old PHI. for (pred_iterator PI = PB; PI != PE; ++PI) NewPN->addIncoming(PN->getIncomingValueForBlock(*PI), *PI); Only in dragonegg-vs-2.9/src: Convert.cpp.orig