This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization bug
- From: Tim Prince <timothyprince at sbcglobal dot net>
- To: surjan at coulson dot chem dot elte dot hu, gcc-bugs at gcc dot gnu dot org
- Cc: bug-gcc at gnu dot org
- Date: Mon, 10 Mar 2003 06:25:40 -0800
- Subject: Re: optimization bug
- References: <20030310142817.A14620@coulson.chem.elte.hu>
- Reply-to: tprince at computer dot org
On Monday 10 March 2003 05:28, surjan at coulson dot chem dot elte dot hu wrote:
> Dear Sir:
> The attached fortran code, named optbug.f, compiles
> with g77 without any message. I use gcc-g77-2.96-112.7.2. Issuing the
> command
>
> g77 -o bug optbug.f
> or
> g77 -O1 -o bug optbug.f
> we get an executable producing the correct result:
> /scr/surjan> bug
> 1 -1
> while optimizing the compilation with O2 or higher
> g77 -O2 -o bug2 optbug.f
> produces the erroneous answer:
> /scr/surjan> bug2
> 1 -100
>
The current snapshot gcc-3.3/g77 produces your correct result. gcc-2.96 was
not a gnu version, and is no longer maintained by anybody. If I may say so,
it's an abomination and I have it on one of my systems only because I just
had to rebuild it after a crash.
--
Tim Prince