At 21:19 30.09.2011 +0200, Gunther Nikl wrote: >Fabian Cenedese wrote: >> I have a problem with an old gcc 2.95.2. > >If you really need GCC 2.95, then you should use the latest version >from the GCC 2.95 CVS branch. Didn't know that existed, I thought 2.x was shelved long ago. >> Before you say that I should update I can tell you that we have >> a new gcc4.5 based toolchain. But we still need to support existing >> projects that work with the old compiler. > >But if the old compiler has a bug, what are you going to do? And what >you are describe later seems to be a bug of GCC 2.95.2/2.95.3. 2.95.3 or 2.94.4 still counts as old, so there shouldn't be a problem to update to these versions or backport some fixes. >> The problem is now that the caller exactly does the described thing, >> but the called function expects a different layout on the stack. The >> string pointer is read from x+16 where of course no useful value is >> stored. It's as if it thinks that at x+12 should be the double value >> which makes no sense as this would need 8 bytes anyway. If I take >> out the double value from the argument list then the two values are >> as expected. >> >> Does this ring a bell? I already tried to look at the diff to gcc 2.95.3 >> to find if this may have been solved but I couldn't understand the >> gcc internal termini. I can understand if nobody has interest in >> compiler archeology but I thought I'd ask anyway. > >I am in no way a PPC expert, but AFAICT it seems to me that GCC >2.95.2/GCC 2.95.3 had a bug with argument passing and it looks >like that the bug is fixed with 2.95.4 (from the CVS branch of >GCC 2.95): Thanks a lot for this hint. bye Fabi