[Bug fortran/69456] Namelist value with trailing sign is ignored without error

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 24 17:38:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69456

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Josiah Schwab from comment #0)
> 
> I read the code for the function parse_real in libgfortran/io/list_read.c
> and this behavior appears to exist because the value '1+1' is permitted as a
> shorthand for '1e+1'.  This was also surprising to me.
> 
> I read the Fortran 2008 specification.  I had difficulty fully understanding
> it, but I failed to find a place where it said that exponent-letter can be
> legally omitted.  A look at the list of gfortran vendor extensions as well
> as a web search also failed to provide additional information.
> 
> 

See Table 10.1, "E and D Exponent Forms" in Fortran 2008 standard.


More information about the Gcc-bugs mailing list