HP-UX 11.x specific errors on gcc 3.2 and 3.3

law@redhat.com law@redhat.com
Mon Jan 27 19:28:00 GMT 2003


In message <200301271055.06540.harri.pasanen@trema.com>, Harri Pasanen writes:
 >I have an auto-generated function that is thousands of lines long.
 >It fails to compile on HP-UX when compiled with -O1 or -O2.
 >
 >gcc 3.2 with -O1 says:
 >
 >Axis.cc:1085: Internal compiler error in output_269, at insn-output.c:1377 
 >
 >
 >for some reason with -O2 it does not fail - but I don't have trust in the 
 >generated code, as some things seem to fail at runtime.
 >
 >
 >gcc 3.3 snapshot dies, both with -O1 and -O2:
 >
 >Axis.cc:1085: internal compiler error: in output_cbranch, at config/pa/pa.c:
 >   5526
 >
 >Looking at pa.c:5526, it says:
 >
 >      case 20:
 >	/* Very long branch.  Right now we only handle these when not
 >	   optimizing.  See "jump" pattern in pa.md for details.  */
 >	if (optimize)
 >	  abort ();
 >
 >-----------
 >
 >I wonder if anyone is working on this, which based on the code comments seems
Both of these failures are PA specific and are extremely difficult to fix.
In simplest terms you've got functions so large that the compiler is unable
to determine a safe way to emit specific jumps within the function.

Turning off the optimizer usually avoids this problem as the jump patterns
know that no registers are live across basic blocks and thus they can put
the jump target into a register and perform an indirect jump to the 
final destination.

What the compiler needs is register scavenging so that it can find a
free register at assembly output time, even when optimizing.  It could
then use that free register to hold the target address and perform an
indirect branch.  This is made more difficult due to delay slot filling.

jeff



More information about the Gcc-bugs mailing list