i386-G++ ICE in output_operand with static and -fPIC

Jim Wilson wilson@tuliptree.org
Sat Jun 14 23:33:00 GMT 2003


Michael Eager wrote:
> the following error is generated:
>   x.cpp: In function `int ListNextX()':
>   x.cpp:19: output_operand: Wrong address expression or operand constraint
> 
> Can someone help me out here?  Where should I be looking?

Use -da to get all of the debugging dumps, and then search them to find 
where the error first occurs, then debug that optimization pass to 
figure out why it creates bad RTL.  Also check the 
GO_IF_LEGITIMATE_ADDRESS macro to make sure it is correct.  This might 
be a problem with a pseudo being accepted someplace where only hard 
registers are OK.  If a pseudo doesn't get allocated to a hard register 
by the register allocator, then it becomes a stack slot reference, and 
then you have an address that isn't valid.

If the problem doesn't exist in current sources, then you might be able 
to find the patch that fixed it by doing a binary search over time. 
This assumes that it is a relatively simple problem that was fixed by a 
single patch.  This doesn't work in every case.

Jim




More information about the Gcc mailing list