This is the mail archive of the gcc-bugs@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]

Re: A serious -fpic and -fomit-frame-pointer bug in egcs 1.0.3/1.1



  In message <m0ytChr-000266C@ocean.lucon.org>you write:
  > I can see this bug is INITIAL_ELIMINATION_OFFSET related. But it is
  > hard to tell if the bug is in INITIAL_ELIMINATION_OFFSET itself. ebx
  > is used or not depends not only on PIC, but also optimization and
  > CPU. INITIAL_ELIMINATION_OFFSET is used twice in reload1.c. I can
  > think of 2 possible fixes:
  > 
  > 1. Remove one of them.
  > 2. Treat both of them the same.
It's not a question of having two calls to INITIAL_ELIMINATION_OFFSET,
the compiler is supposed to work when the two calls produce different
results.  In fact, the second call can be executed many times because
the offsets may change when something gets spilled to the stack.

If something changes after the big while loop in reload1.c::reload,
then that's a problem.  But I get the feeling your call to
force_const_mem that is causing the offsets to change is occuring
after the first call to INITIAL_ELIMINATION_OFFSET, but before the
second call.

That should still be OK -- the compiler is supposed to handle that
situation.  If it isn't, we need to dive deeper into the problem.

jeff


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