Date: 14 Jul 2003 18:35:10 -0700 From: LLeweLLyn Reese <llewelly@lifesupport.shutdown.com> To: Chuck Swiger <cswiger@mac.com> Cc: freebsd Questions <freebsd-questions@freebsd.org> Subject: Re: buggy optimization levels... Message-ID: <x3el0szi5t.fsf@lifesupport.shutdown.com> In-Reply-To: <3F1322A9.8080805@mac.com> References: <3F1322A9.8080805@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Swiger <cswiger@mac.com> writes:
> Hi, all--
>
> The "known bugs" section of the GCC info documentation lists 5 issues;
> "man gcc" lists none. Can someone provide a test case for a bug
> involving "cc -O" versus "cc -O3" under FreeBSD 4-STABLE for the x86
> architecture?
You could probably find a few by searching the bug data base at:
http://gcc.gnu.org/bugzilla/
>
> What is the preferred solution? The Dragon book and other compiler
> references have a definition of safe versus unsafe "optimizations"; is
> the problem that -O3 enables something unsafe?
I believe that none of -O[0-3s] are intended to enable unsafe
optimizations. (There are some optimization flags, which are *not*
enabled by any -O opt, like -ffast-math, which are documented to
be unsafe in some fashion or another; see
http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Optimize-Options.html#Optimize%20Options)
> Who is responsible
> (FreeBSD, GNU compiler team, others?) for changing the compiler
> defaults so that -Ox will not produce known-invalid results, for any x?
[snip]
If gcc produces invalid results or bad code at any optimization level,
I think you should report it as a bug according to the
instructions at http://gcc.gnu.org/bugs.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?x3el0szi5t.fsf>
