public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
@ 2011-08-17 19:12 hanson at physics dot auburn.edu
2011-08-17 19:38 ` [Bug fortran/50109] " kargl at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: hanson at physics dot auburn.edu @ 2011-08-17 19:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Bug #: 50109
Summary: Formatted namelist read with multiple "!" fails with:
Cannot match namelist object name !
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hanson@physics.auburn.edu
Created attachment 25037
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25037
Fortran source files to show the bug.
A namelist read of the file
$indata
NFP = 5,
!
!
!
/
results in:
Fortran runtime error: Cannot match namelist object name !
I have produced the error with gcc 4.6.0:
gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.4.0
Configured with: ../gcc-4.6-20101106/configure --enable-languages=fortran
Thread model: posix
gcc version 4.6.0 20101106 (experimental) (GCC)
and on gcc 4.4.3:
f95 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
I'm sorry, I rely on others to install compilers, so I can't test it on other
versions.
This seems very similar to Bug 49791
Attached is a short code which produces the error.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
@ 2011-08-17 19:38 ` kargl at gcc dot gnu.org
2011-08-17 20:36 ` hanson at physics dot auburn.edu
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-08-17 19:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Known to work| |4.2.5
Known to fail| |4.3.6, 4.4.7, 4.5.3, 4.6.1,
| |4.7.0
--- Comment #1 from kargl at gcc dot gnu.org 2011-08-17 19:32:28 UTC ---
If one changes the write statement to output nfp, then
gfortran 4.2.5 prints out '5'.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
2011-08-17 19:38 ` [Bug fortran/50109] " kargl at gcc dot gnu.org
@ 2011-08-17 20:36 ` hanson at physics dot auburn.edu
2011-08-17 20:50 ` hanson at physics dot auburn.edu
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hanson at physics dot auburn.edu @ 2011-08-17 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Jim Hanson <hanson at physics dot auburn.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #25037|0 |1
is obsolete| |
--- Comment #2 from Jim Hanson <hanson at physics dot auburn.edu> 2011-08-17 20:34:38 UTC ---
Created attachment 25039
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25039
Improved test case.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
2011-08-17 19:38 ` [Bug fortran/50109] " kargl at gcc dot gnu.org
2011-08-17 20:36 ` hanson at physics dot auburn.edu
@ 2011-08-17 20:50 ` hanson at physics dot auburn.edu
2011-08-17 21:31 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hanson at physics dot auburn.edu @ 2011-08-17 20:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #3 from Jim Hanson <hanson at physics dot auburn.edu> 2011-08-17 20:35:44 UTC ---
(In reply to comment #1)
> If one changes the write statement to output nfp, then
> gfortran 4.2.5 prints out '5'.
Oops. I attached an improved test case.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (2 preceding siblings ...)
2011-08-17 20:50 ` hanson at physics dot auburn.edu
@ 2011-08-17 21:31 ` burnus at gcc dot gnu.org
2011-08-18 9:37 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-17 21:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Priority|P3 |P4
CC| |burnus at gcc dot gnu.org,
| |jvdelisle at gcc dot
| |gnu.org
Known to work| |4.1.2
Target Milestone|--- |4.5.4
Summary|Formatted namelist read |[4.3/4.4/4.5/4.6
|with multiple "!" fails |Regression] Formatted
|with: Cannot match namelist |namelist read with multiple
|object name ! |"!" fails with: Cannot
| |match namelist object name
| |!
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (3 preceding siblings ...)
2011-08-17 21:31 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
@ 2011-08-18 9:37 ` burnus at gcc dot gnu.org
2011-08-18 14:28 ` burnus at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-18 9:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-18 09:11:21 UTC ---
Draft patch:
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -345,28 +345,19 @@ eat_separator (st_parameter_dt *dtp)
do
{
if ((c = next_char (dtp)) == EOF)
return LIBERROR_END;
if (c == '!')
{
err = eat_line (dtp);
if (err)
return err;
- if ((c = next_char (dtp)) == EOF)
- return LIBERROR_END;
- if (c == '!')
- {
- err = eat_line (dtp);
- if (err)
- return err;
- if ((c = next_char (dtp)) == EOF)
- return LIBERROR_END;
- }
+ c = '\n';
}
}
while (c == '\n' || c == '\r' || c == ' ' || c == '\t');
unget_char (dtp, c);
}
break;
case '!':
if (dtp->u.p.namelist_mode)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (4 preceding siblings ...)
2011-08-18 9:37 ` burnus at gcc dot gnu.org
@ 2011-08-18 14:28 ` burnus at gcc dot gnu.org
2011-08-18 16:13 ` burnus at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-18 14:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-18 14:23:46 UTC ---
Author: burnus
Date: Thu Aug 18 14:23:41 2011
New Revision: 177858
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177858
Log:
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* io/list_read.c (eat_separator): Fix skipping over "!" lines.
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* gfortran.dg/namelist_73.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/namelist_73.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (5 preceding siblings ...)
2011-08-18 14:28 ` burnus at gcc dot gnu.org
@ 2011-08-18 16:13 ` burnus at gcc dot gnu.org
2011-08-19 9:17 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-18 16:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.4 |4.4.7
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (6 preceding siblings ...)
2011-08-18 16:13 ` burnus at gcc dot gnu.org
@ 2011-08-19 9:17 ` burnus at gcc dot gnu.org
2011-08-19 9:17 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-19 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-19 09:16:08 UTC ---
Author: burnus
Date: Fri Aug 19 09:16:03 2011
New Revision: 177893
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177893
Log:
2011-08-19 Tobias Burnus <burnus@net-b.de>
Backport from mainline
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* io/list_read.c (eat_separator): Fix skipping over "!" lines.
2011-08-19 Tobias Burnus <burnus@net-b.de>
Backport from mainline
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* gfortran.dg/namelist_73.f90: New.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/namelist_73.f90
Modified:
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/libgfortran/ChangeLog
branches/gcc-4_5-branch/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (7 preceding siblings ...)
2011-08-19 9:17 ` burnus at gcc dot gnu.org
@ 2011-08-19 9:17 ` burnus at gcc dot gnu.org
2011-08-19 12:01 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-19 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-19 09:14:59 UTC ---
Author: burnus
Date: Fri Aug 19 09:14:55 2011
New Revision: 177892
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177892
Log:
2011-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* io/list_read.c (eat_separator): Fix skipping over "!" lines.
2011-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* gfortran.dg/namelist_73.f90: New.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/namelist_73.f90
Modified:
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/libgfortran/ChangeLog
branches/gcc-4_6-branch/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (8 preceding siblings ...)
2011-08-19 9:17 ` burnus at gcc dot gnu.org
@ 2011-08-19 12:01 ` burnus at gcc dot gnu.org
2011-08-19 13:34 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6/4.7 " burnus at gcc dot gnu.org
2011-08-19 14:07 ` burnus at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-19 12:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-19 11:55:19 UTC ---
Author: burnus
Date: Fri Aug 19 11:55:16 2011
New Revision: 177895
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177895
Log:
2011-08-19 Tobias Burnus <burnus@net-b.de>
Backport from mainline
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* io/list_read.c (eat_separator): Fix skipping over "!" lines.
2011-08-19 Tobias Burnus <burnus@net-b.de>
Backport from mainline
2011-08-18 Tobias Burnus <burnus@net-b.de>
PR fortran/50109
* gfortran.dg/namelist_73.f90: New.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_73.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
branches/gcc-4_4-branch/libgfortran/ChangeLog
branches/gcc-4_4-branch/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6/4.7 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (9 preceding siblings ...)
2011-08-19 12:01 ` burnus at gcc dot gnu.org
@ 2011-08-19 13:34 ` burnus at gcc dot gnu.org
2011-08-19 14:07 ` burnus at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-19 13:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4/4.5/4.6 |[4.3/4.4/4.5/4.6/4.7
|Regression] Formatted |Regression] Formatted
|namelist read with multiple |namelist read with multiple
|"!" fails with: Cannot |"!" fails with: Cannot
|match namelist object name |match namelist object name
|! |!
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-19 13:33:20 UTC ---
FIXED on the 4.4, 4.5 and 4.6 branches and on the trunk (4.7). I did not back
port the fix to the no longer maintained 4.3 branch.
Thanks for that bugreport!
At least for the Linux version, there should be very soon a new build available
at http://gcc.gnu.org/wiki/GFortranBinaries ; I think the Darwin builds are
less regularly updated. Otherwise, you either need to build it yourself or wait
for an updated version (linked on that page or of your distribution).
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/50109] [4.3/4.4/4.5/4.6/4.7 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
` (10 preceding siblings ...)
2011-08-19 13:34 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6/4.7 " burnus at gcc dot gnu.org
@ 2011-08-19 14:07 ` burnus at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-19 14:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-19 13:45:38 UTC ---
Really close as FIXED.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-19 13:46 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-17 19:12 [Bug fortran/50109] New: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! hanson at physics dot auburn.edu
2011-08-17 19:38 ` [Bug fortran/50109] " kargl at gcc dot gnu.org
2011-08-17 20:36 ` hanson at physics dot auburn.edu
2011-08-17 20:50 ` hanson at physics dot auburn.edu
2011-08-17 21:31 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
2011-08-18 9:37 ` burnus at gcc dot gnu.org
2011-08-18 14:28 ` burnus at gcc dot gnu.org
2011-08-18 16:13 ` burnus at gcc dot gnu.org
2011-08-19 9:17 ` burnus at gcc dot gnu.org
2011-08-19 9:17 ` burnus at gcc dot gnu.org
2011-08-19 12:01 ` burnus at gcc dot gnu.org
2011-08-19 13:34 ` [Bug fortran/50109] [4.3/4.4/4.5/4.6/4.7 " burnus at gcc dot gnu.org
2011-08-19 14:07 ` burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).