public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
@ 2013-03-30 10:18 burnus at gcc dot gnu.org
  2013-04-01  0:05 ` [Bug libfortran/56786] " jvdelisle at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-03-30 10:18 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

             Bug #: 56786
           Summary: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with
                    designators containing embedded spaces
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jvdelisle@gcc.gnu.org, tiloschwarz@gcc.gnu.org
            Blocks: 56744


Split off from PR 52512.

The following program runs successfully with GCC 4.1, 4.3 and 4.5, but it fails
with GCC 4.6 to GCC 4.9. It also works with Crayftn, PGI and ifort.

The problem is the space in "i(3 )=". Strictly speaking, that is invalid but as
it worked before, others support it as well, and as ignoring spaces in
"name(...)" is nonambiguous, I believe that we should support it.

(F2008, "10.11.2 Name-value subsequences", paragraph 2 has: "Each designator
may be preceded and followed by one or more optional blanks but shall not
contain embedded blanks.")



integer :: i(3)
namelist /nml/ i

i = -42
open(99,status='scratch')
write(99,'(a)') '&nml i(3 ) = 5 /'
rewind(99)
read(99,nml=nml)
close(99)
write(*,nml=nml)
if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
end


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
@ 2013-04-01  0:05 ` jvdelisle at gcc dot gnu.org
  2013-04-01 20:26 ` burnus at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2013-04-01  0:05 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2013-04-01 00:05:14 UTC ---
Author: jvdelisle
Date: Sun Mar 31 20:32:33 2013
New Revision: 197290

URL: http://gcc.gnu.org/viewcvs?rev=197290&root=gcc&view=rev
Log:
2013-03-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    PR libfortran/56786
    * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
    when checking for EOF. Use error return mechanism when EOF detected.
    Do not return false unless parse_err_msg and parse_err_msg_size have
    been set. Use hit_eof.
    (nml_get_obj_data): Likewise use the correct error mechanism.
    * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
    mode.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/list_read.c
    trunk/libgfortran/io/transfer.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
  2013-04-01  0:05 ` [Bug libfortran/56786] " jvdelisle at gcc dot gnu.org
@ 2013-04-01 20:26 ` burnus at gcc dot gnu.org
  2013-04-01 20:27 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-01 20:26 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-01 20:26:22 UTC ---
*** Bug 56803 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
  2013-04-01  0:05 ` [Bug libfortran/56786] " jvdelisle at gcc dot gnu.org
  2013-04-01 20:26 ` burnus at gcc dot gnu.org
@ 2013-04-01 20:27 ` burnus at gcc dot gnu.org
  2013-04-01 20:29 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-01 20:27 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-01 20:27:31 UTC ---
(In reply to comment #2)
> *** Bug 56803 has been marked as a duplicate of this bug. ***

Author: jvdelisle
Date: Sun Mar 31 20:37:19 2013
New Revision: 197291

URL: http://gcc.gnu.org/viewcvs?rev=197291&root=gcc&view=rev
Log:
2013-03-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    PR fortran/56786
    * gfortran.dg/namelist_81.f90:  New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/namelist_81.f90
Modified:
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-04-01 20:27 ` burnus at gcc dot gnu.org
@ 2013-04-01 20:29 ` burnus at gcc dot gnu.org
  2013-04-02  9:08 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-01 20:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Target Milestone|---                         |4.6.4

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-01 20:29:46 UTC ---
(In reply to comment #2)
> *** Bug 56803 has been marked as a duplicate of this bug. ***

That bug has the following test case. We should consider adding it as well. In
addition, the compiler should report END of file and not an error - hence,
libgfortran is not according the standard by failing in the wrong way:

implicit none
integer :: ii
namelist /nml/ ii
open(99, status="scratch")
write(99,'(a)') "&nml ii=55"
rewind(99)
read(99, nml=nml, end=77, err=90)
print *, ii
stop 'OK - vendor extension: successful READ w/o "/"'
77 stop 'OK - END of FILE hit'
90 call abort() ! Wrong
end


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-04-01 20:29 ` burnus at gcc dot gnu.org
@ 2013-04-02  9:08 ` rguenth at gcc dot gnu.org
  2013-04-12 15:18 ` [Bug libfortran/56786] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-02  9:08 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-04-02  9:08 ` rguenth at gcc dot gnu.org
@ 2013-04-12 15:18 ` jakub at gcc dot gnu.org
  2013-04-27 22:51 ` jvdelisle at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:18 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.4                       |4.7.4

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:17:08 UTC ---
GCC 4.6.4 has been released and the branch has been closed.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-04-12 15:18 ` [Bug libfortran/56786] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-04-27 22:51 ` jvdelisle at gcc dot gnu.org
  2013-04-28 16:56 ` jvdelisle at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2013-04-27 22:51 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2013-04-27 22:51:47 UTC ---
I am in the process of back port to 4.8 along with Tilos patches for 52512 and
probably 51825.

I will do each separately so we can have a clear record.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-04-27 22:51 ` jvdelisle at gcc dot gnu.org
@ 2013-04-28 16:56 ` jvdelisle at gcc dot gnu.org
  2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
  2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2013-04-28 16:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

--- Comment #7 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2013-04-28 16:55:52 UTC ---
Author: jvdelisle
Date: Sun Apr 28 13:47:42 2013
New Revision: 198370

URL: http://gcc.gnu.org/viewcvs?rev=198370&root=gcc&view=rev
Log:
2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    Backport from mainline:

    PR libfortran/56786
    * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
    when checking for EOF. Use error return mechanism when EOF detected.
    Do not return FAILURE unless parse_err_msg and parse_err_msg_size have
    been set. Use hit_eof.
    (nml_get_obj_data): Likewise use the correct error mechanism.
    * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
    mode.

    PR fortran/56786
    * gfortran.dg/namelist_81.f90:  New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/namelist_81.f90
Modified:
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/libgfortran/ChangeLog
    branches/gcc-4_8-branch/libgfortran/io/list_read.c
    branches/gcc-4_8-branch/libgfortran/io/transfer.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-04-28 16:56 ` jvdelisle at gcc dot gnu.org
@ 2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
  2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2013-04-28 17:21 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2013-04-28 17:21:12 UTC ---
Author: jvdelisle
Date: Sun Apr 28 17:20:06 2013
New Revision: 198375

URL: http://gcc.gnu.org/viewcvs?rev=198375&root=gcc&view=rev
Log:
2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    Backport from mainline:

    PR libfortran/56786
    * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
    when checking for EOF. Use error return mechanism when EOF detected.
    Do not return FAILURE unless parse_err_msg and parse_err_msg_size have
    been set. Use hit_eof.
    (nml_get_obj_data): Likewise use the correct error mechanism.
    * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
    mode.

    Backport from trunk:

    PR fortran/56786
    * gfortran.dg/namelist_81.f90:  New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/namelist_81.f90
Modified:
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/libgfortran/ChangeLog
    branches/gcc-4_7-branch/libgfortran/io/list_read.c
    branches/gcc-4_7-branch/libgfortran/io/transfer.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
  2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
@ 2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2013-04-28 17:21 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2013-04-28 17:21:56 UTC ---
Fixed on 4.8 and 4.7 Closing


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-04-28 17:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-30 10:18 [Bug libfortran/56786] New: [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces burnus at gcc dot gnu.org
2013-04-01  0:05 ` [Bug libfortran/56786] " jvdelisle at gcc dot gnu.org
2013-04-01 20:26 ` burnus at gcc dot gnu.org
2013-04-01 20:27 ` burnus at gcc dot gnu.org
2013-04-01 20:29 ` burnus at gcc dot gnu.org
2013-04-02  9:08 ` rguenth at gcc dot gnu.org
2013-04-12 15:18 ` [Bug libfortran/56786] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-04-27 22:51 ` jvdelisle at gcc dot gnu.org
2013-04-28 16:56 ` jvdelisle at gcc dot gnu.org
2013-04-28 17:21 ` jvdelisle at gcc dot gnu.org
2013-04-28 17:21 ` jvdelisle 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).