pr25039 Frontend problem?

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Nov 28 18:26:00 GMT 2005


On Mon, Nov 28, 2005 at 09:57:04AM -0800, Richard E Maine wrote:
> On Nov 25, 2005, at 9:00 PM, Jerry DeLisle wrote:
> >Steve Kargl wrote:
> >>On Fri, Nov 25, 2005 at 05:38:36PM -0800, Jerry DeLisle wrote:
> >>>Could someone take a look at -fdump-tree-original and confirm if 
> >>>this is a frontend problem.  I think this is a regression with this 
> >>>unprintable chracter showing up in the struct statement.
> >>>
> >>Is "1,1" valid input (where I'm using quotes because space is 
> >>important)?
> >>The read statement is READ(5,'(2i9)') I1,I2.  This is expecting 2 
> >>integers
> >>where the width of each integer field is 9 characters.  "1,1" is 3
> >>characters.  It's been awhile since I looked at what a comma does
> >>in formatted input (I normally do unformatted input).  Does a comma
> >>short-circuit a field width?
> >Thats what I thought, that the spaces mattered. Well g77 and ifort 
> >accept the input and evidently a comma does short-circuit the field 
> >width.
> 
> The standard says that a comma does *NOT* short-circuit the field width 
> in an explicit format. (By the way, I assume that the above reference 
> to "unformatted" actually refers to list-directed formatting. Please, 
> list-directed is a specific case of formatted input; it is *NOT* 
> unformatted. I have helped multiple people fix buggy code caused by 
> this misuse of terminology; they open a file with form='unformatted' 
> because they intend to use list-directed I/O on it).

Mea culpa.

do i=1, 20
   print *, "I will not confuse list-directed formatting with unformatted IO"
end do 
print *, ':-)'
end

Now you know why I don't work on the IO portion of gfortran.

> I think I have mentioned before that I fear gfortran is going too far 
> in the direction of accepting every strange nonstandard feature out 
> there. In my personal opinion, that isn't the path to follow to get a 
> robust and user-friendly compiler.

Even though I've implemented some of these nonstandard features, I'm
actually fond of this opinion.  I would like to make -std=f95 the
default, but reality won't permit this.  Just look at the PR database.
We have numerous PR's that contain a variation of "g77 accepted this
code, why is gfortran broken".  After awhile, it gets tiresome to
tell people to fix their nonconforming code; a position you surely
understand.

-- 
Steve



More information about the Fortran mailing list