gcc 4.1 -O1 problem

Kevin Shanahan kmshanah@disenchant.net
Thu Mar 16 18:38:00 GMT 2006

On Thu, Mar 16, 2006 at 06:50:42AM -0600, John Love-Jensen wrote:
> I think your code is correct, and the GCC 4.1 compiler has a boo-boo.  File
> a bug report, please, including the code snippet that reproduces the
> suspected bug, what platform, and the command line used to compile the code.
> See "Bugs" section on the left column of <http://gcc.gnu.org/>.

Okay, thanks. I've filed this as bug #26719.

> Anyway, here's a couple bits of tid (as I understand it):
> -O0 disables all optimizations.  The -fenable-something likely don't enable
> the specified optimization when -O0 is specified (if there are exceptions,
> I'm not aware of them).

I tried with and without -O0 specified; it didn't seem to make a

> -fverbose-asm (with -S or -save-temps) is useful to ascertain what
> optimizations are happenings with -O1, -O2, -O3, -Os.

Using -fverbose-asm and -save-temps, it seems to show a few more
optimisations being used than the man page indicates. I might try a
few of those and add it to the bug info if it makes a difference.


More information about the Gcc-help mailing list