This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/30193] Namelist issues when reading in asterisk preceeded arrays
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2006 07:46:28 -0000
- Subject: [Bug libfortran/30193] Namelist issues when reading in asterisk preceeded arrays
- References: <bug-30193-10487@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2006-12-13 07:46 -------
> "&test", &
> "ihp(1,1) = 2*1", &
> "ihp(1,2) = 2", &
> "/"
> READ (UNIT=22, NML=test)
I think the result is *not* well defined:
ihp(1,1) = 2*1
does make sense - one cannot assign 2 values to ihp(1,1). I think what meant
is:
ihp(1:2,1) = 2*1
I think therefore the result is implementation dependent and the error
"Fortran runtime error: Repeat count too large for namelist object ihp"
is correct, though not necessarily the best choice.
NAG f95 for instance writes: 1 * 2 *
whereas ifort/g95/gfortran/sunf95: 1 1 2 *
(* = uninitialized value; some compiler preinitialize them with zero.)
> I have not ported these to 4.1 I suspect.
Using "4.1.2 20061115 (prerelease) (SUSE Linux)"
I get the same result as with gfortran 4.3, I think therefore that the patch
has already been backported.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30193