I'm seeing an infinite loop in g++.dg/pph/c1limits-externalid.cc. The while() loop in pph_search_in_chain is not ending. Or maybe it's falling into the N^2 trap you mention in that routine?
I've added a short timeout to this test and XFAIL'd it so you can debug it. Diego.