This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]