gfortran or tree-ssa bug?

Paul Brook paul@codesourcery.com
Sun Apr 4 11:50:00 GMT 2004


On Sunday 04 April 2004 02:21, Steve Kargl wrote:
> Paul, Steven,
>
> Well, I thought I chose an easy bug to chase down, but I'm
> now scratching my head.  Here's, the Fortran
>
> program b
>    implicit none
>    real x
>    complex y
>    x = sqrt(9.125)**2 - 9.125
>    y = cabs(cexp((-2.5, 1.375))) - exp(5.0 / (-2.0))
> end program b
>
> Technically, I believe a Fortran compiler could eliminate these
> statements during compilation.  Here's the end of my gdb session.
> We appeared to have reached the asm generation stage when suddenly
> the Error message is issued.  (If anything, the Error should be at worst
> a Warning.)  What I can't determine is if this a gfortran frontend
> bug or tree-ssa const-folding bug.

This is entirely a frontend thing. The expressions are rediced to a constant 
by the frontend.
The underflow error should be changed into a warning. This should be a fairly 
simple change, just grep the source for the error message.

I'm not sure what's happening when you're running it under gdb, but it's 
nothing to do with outputting assembly.

This is PR14059

Paul



More information about the Fortran mailing list