Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 1997 16:01:19 -0800 (PST)
From:      Jake Hamby <hamby@aris.jpl.nasa.gov>
To:        "David S. Miller" <davem@jenolan.rutgers.edu>
Cc:        asami@vader.cs.berkeley.edu, jmb@freefall.freebsd.org, hackers@FreeBSD.ORG
Subject:   Re: Sun Workshop compiler vs. GCC?
Message-ID:  <Pine.GSO.3.95.970215155419.18262A-100000@aris>
In-Reply-To: <199702140448.XAA18687@jenolan.caipgeneral>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Feb 1997, David S. Miller wrote:
> 
>    Also, the various optimizer bugs in GCC in the past have led people
>    to be wary to use -O2 optimization, much less try additional
>    optimization flags.
> 
> I know about them, just about all of them are in the strength
> reduction pass.  I am very familiar with the problematic bugs this
> layer has, and I have been actively trying to get people on the GCC
> development team to fix them.  Almost all of these problems have to do
> with when a pointer comparison is converted into an integer invariant
> comparison, and vice versa.  GCC in certain circumstances does not
> notice the change in signed'ness and thus produces incorrect code.  In
> gcc-2.7.2.1, the strength reduction transformations that were known to
> lead to this situation were disabled entirely and in fact this fix was
> the entire reason for that release of gcc.

Thanks for the insight into GCC.  You might find it amusing to know that
I've already discovered an optimizer bug in the latest version of Sun's C
compiler!  It affected the directory listing of XV when I compiled it with
-fast (or any combination of -xO2 or higher optimization plus
-xtarget=486, pentium, or pentium_pro).  Fortunately, the nature of the
bug was such that:  1) I was able to track it down within a few minutes
(without needing a debugger), and 2) I was able to create a stand-alone
program to demonstrate the bug.  So I sent it as a bug report to the
appropriate E-Mail address at Sun.  It will be interesting to see how soon
it is patched.

In my programming career, I've discovered one other optimizer bug, in
Metrowerks Codewarrior (BeOS/PowerPC).  It was rather gratifying to see it
fixed in the very next patch release, with my example code listed in the
README under bugs fixed.  :)

------------------------------------------------------------------------------
|Jake Hamby| APT Engineer at JPL, CS student at Cal Poly, and BeOS developer!|
------------------------------------------------------------------------------
"Life is hard..."




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.95.970215155419.18262A-100000>