This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]