ICE hunting..
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon May 10 16:44:00 GMT 2004
On Mon, May 10, 2004 at 10:20:19AM +0300, Janne Blomqvist wrote:
> On Thu, May 06, 2004 at 12:19:59PM -0700, Steve Kargl wrote:
> > On Thu, May 06, 2004 at 09:52:52PM +0300, Janne Blomqvist wrote:
> > Welcome aboard.
>
> Thanks.
>
> > > Warning: Nonnegative width required in format string at (1)
> >
> > There are two problems. The above warning should be an error.
>
> I haven't read the standard, is this stated as an error instead of
> merely undefined behaviour? I have personally successfully compiled it
> with ifort and xlf, and neither treat it as an error. Also the program
> is supplied with Makefiles for a lot of compilers, so apparently most
> compilers don't treat this as an error either. Of course, that is no
> excuse for gfortran (or any other compiler) to treat it as a warning
> if the standard explicitly says it's an error. ;-)
troutmask:kargl[204] cat > z.f90
program z
integer i
i = 1
write(*,'(I)') i
end program z
troutmask:kargl[205] f95 -o z z.f90
Error: z.f90, line 4: Missing field width for I edit descriptor
[f95 error termination]
f95 is NAG's compiler.
>From a draft of Fortran 200X
10.6.1.1 Integer editing
The Iw, Iw.m, Bw, Bw.m, Ow, Ow.m, Zw, and Zw.m edit descriptors indicate
that the field to be edited occupies w positions, except when w is zero.
When w is zero, the processor selects the field width. On input, w shall
not be zero. The specified input/output list item shall be of type integer.
The G edit descriptor also may be used to edit integer data (10.6.4.1.1).
It appears that some compilers consider '(I)' to be the same as '(I0)'.
>
> > The problem below is more important to understand. Can you
> > cut xml.f90 down to a small test program?
>
> A couple of other guys guessed that this might be
> #15182. Unfortunately I have been unable to access gcc.gnu.org since
> friday, so I haven't been able to check it. Somebody mentioned that
> the ip address has changed, so apparently this is due to some dns
> problems. I have tried with a bunch of name servers, and they either
> answer that gcc.gnu.org is 12.107.209.250 (which seems stone dead) or
> that it doesn't exist.
>
It looks like 15182 and your (elided) code are the same bug.
--
Steve
More information about the Fortran
mailing list