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


Jim Wilson wrote:
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.

Thanks for the suggestions. I have been comparing the RTL generated with and without static. Unfortunately, nothing has looked obviously in error. I'll look for a pseudo and stack ref.

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.

Yep, that's my next step -- see what the current sources generate for the same code and track down what is different.


-- Michael Eager Eager Consulting eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077


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