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: Bug in C++ tree inlining or in PPC backend?



Franz --

  I'm going to have a hard time doing anything with your test case
because of its size.  I don't have PPC hardware, which makes it even
more difficult.  I know these kinds of problems tend to go away when
the test-cases get smaller, but I bet you can shrink it a little bit,
at least, and that would help.

  The thing to do, painful as it is (and I know because I've done it)
is to stare at the assembly code until you can see that *this* value
right *here* is wrong.  You can work back from the first point there
is observably incorrect output.  For instance, in your case, something
is going wrong in the calculation of the length of `z' in the
iostreams code.  So, first see whether `z' contains the right string
or not.  Then, see where and how the length is being calculated and
see what goes wrong.  Eventually you'll find that thus-and-such stack
slot is being clobbered, but the value is still needed.  Then, you can
track down why the compiler is doing that.

  The fact that your patch fixes the problem is peculiar.  If I read
it right, you're saying that -fstrict-aliasing helps in that it
prevents stack slots from being reused (because we never taught the
aliasing code about stack-slot lifetimes).

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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