POV-Ray : Newsgroups : povray.programming : GCC bug manifested in Colour Patch : Re: GCC bug manifested in Colour Patch Server Time
29 Jul 2024 02:19:59 EDT (-0400)
  Re: GCC bug manifested in Colour Patch  
From: Dan Connelly
Date: 2 Dec 1998 22:08:49
Message: <366600BF.E5E3C330@flash.net>
I would guess it's getting sloppy about optimizing register
utilization, or something similar.  The function call forces
it to save the contents before the call and reload them after,
I suspect.

Of interest is the statements surrounding this library function call,
not the call itself.  And the real proof is in the object code coming
out of the compiler.

Dan


Daren Scot Wilson wrote:
> 
> This isn't the right forum to discuss gcc bugs, but I don't want anyone
> looking at my patch, wondering why there's this strange line in there,
> thinking I'm insane.  Well, I mean, of course I *am* insane, just not
> for that reason...   :-P
> 
> I made a discovery concerning the GNU C compiler - it has  a bug!   If
> you look at the source code in my Colour Dispersion patch, you'll see a
> line that goes
> 
>         strcat("A", 'a');
> 
> which accomplishes nothing, except that if it's removed and certain
> compiler optimizations are turned on, POV-Ray will incorrectly render
> refraction.  I hope to narrow POVRay down to a simple few-line test
> program and pass it on to the GCC developers.
> 
> The optimizations I used were:
>    -O2 -mpentium -finline-functions

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.