This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/49791] [4.4/4.5/4.6/4.7 Regression] Formatted namelist reads fails with: Cannot match namelist object
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jul 2011 09:31:14 +0000
- Subject: [Bug libfortran/49791] [4.4/4.5/4.6/4.7 Regression] Formatted namelist reads fails with: Cannot match namelist object
- Auto-submitted: auto-generated
- References: <bug-49791-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49791
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |wrong-code
Last reconfirmed| |2011.07.20 09:30:41
CC| |burnus at gcc dot gnu.org,
| |jvdelisle at gcc dot
| |gnu.org
Ever Confirmed|0 |1
Summary|[4.6 Regression] Formatted |[4.4/4.5/4.6/4.7
|namelist reads of arrays |Regression] Formatted
|don't work |namelist reads fails with:
| |Cannot match namelist
| |object
Target Milestone|--- |4.4.7
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-20 09:30:41 UTC ---
CONFIRMED.
* * *
Note: The format is not standard conform. Issues: "$" vs "&", "$end" vs "/".
However, the real problem is:
xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,
instead of (working)
xpos(1:5)= 0.00, 0.10, 0.20, 0.30, 0.40,
or
xpos= 0.00, 0.10, 0.20, 0.30, 0.40,
or
xpos(:)= 0.00, 0.10, 0.20, 0.30, 0.40,
or
xpos(1:)= 0.00, 0.10, 0.20, 0.30, 0.40,
or ...
Thus, the workaround is to fix the array bounds in the namelist file.
Note: The program works with ifort, g95, pathf95, openf95, pgf90; it fails with
the pedantic NAG - and (this PR) with the current gfortran versions.
* * *
Working: (4.6 trunk) 2010-09-28-r164677
gcc-4.5-2010-07-23-r162436
Failing:
4.7 trunk: current, 2011-05-10, 2011-05-28-r174379
gcc-4.5-x86_64-2010-11-13-r166693
Combining the 4.6/4.7 and the 4.5 data, I think the following patch is the
culprit. As it has been back-ported to 4.4/4.5, I have now adapted the summary.
When we know how obvious the patch is, we can still adjust the target milestone
- currently it is 4.4.7.
Author: jvdelisle
Date: Tue Oct 26 19:05:08 2010
New Revision: 165979
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165979
Log:
2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/46010
* io/list_read.c (nml_parse_qualifier): Add additional conditions for
setting the end index for loop specification. Fix some whitespace.
* io/write.c (write_default_char4): Const-ify the source argument.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/list_read.c
trunk/libgfortran/io/write.c