Thus spake Adrian Chadd <[EMAIL PROTECTED]>:
> On Sat, Feb 08, 2003, David Schultz wrote:
> > Yes, the possibility of being bitten by compiler bugs is certainly
> > higher with higher optimization levels.  Alpha with -O2 seems to
> > have been broken for years, and I have seen strange things happen
> > on IA64 as well.  But the i386 code generators have received much
> > wider testing and debugging, so there is somewhat less danger there.
> Yet squid under i386 freebsd is .. well, finds -O bugs in gcc.
> We gave up trying -O under FreeBSD a long time ago. :-)

The last time someone told me, ``gcc -O is broken'', it turned out
that they were doing some stack fiddling, and gcc's optimizations
broke their faulty assumptions.  On the other hand, I'm sure gcc -O
does have bugs.  Do you have an example snippet that gets miscompiled?

> (note: I've seen better performance gains by telling gcc exactly what
> CPU you have over -O65536 ..)

Strangely, gcc in FreeBSD 5.0 actually generates *slower* code
when compiling for more recent architectures than when compiling
for a 386.  I don't know whether that is a bug in gcc or whether
gcc is using some fancy feature like SSE that the kernel handles
poorly on context switches.  I think there was some discussion on
the lists about it earlier.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to