public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/25463]  New: T edit descriptor and ADVANCE="no"
@ 2005-12-17 17:45 tkoenig at gcc dot gnu dot org
  2005-12-17 21:33 ` [Bug libfortran/25463] " jvdelisle at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-12-17 17:45 UTC (permalink / raw)
  To: gcc-bugs

$ cat advance.f90
program main
  write (*,'(A)',advance="no") 'ab'
  write (*,'(T1,A)') 'c'
end
$ gfortran advance.f90
$ ./a.out
ab$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../gcc/trunk/configure --prefix=/home/ig25
--enable-languages=c,fortran
Thread model: posix
gcc version 4.2.0 20051214 (experimental)

The output should be 
abc
(see Richard Maine's posting, <1h7pi1z.dwx39giomozkN%nospam@see.signature>).


-- 
           Summary: T edit descriptor and ADVANCE="no"
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
@ 2005-12-17 21:33 ` jvdelisle at gcc dot gnu dot org
  2005-12-17 22:23 ` tkoenig at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-17 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jvdelisle at gcc dot gnu dot org  2005-12-17 21:33 -------
This simple patch appears to fix this:  The stement moved needs to be executed
before the return is called.

===================================================================
*** io/transfer.c       (revision 108671)
--- io/transfer.c       (working copy)
*************** finalize_transfer (st_parameter_dt *dtp)
*** 2017,2022 ****
--- 2017,2023 ----
      finish_list_read (dtp);
    else
      {
+       dtp->u.p.current_unit->current_record = 0;
        if (dtp->u.p.advance_status == ADVANCE_NO || dtp->u.p.seen_dollar)
        {
          /* Most systems buffer lines, so force the partial record
*************** finalize_transfer (st_parameter_dt *dtp)
*** 2027,2033 ****
        }

        next_record (dtp, 1);
-       dtp->u.p.current_unit->current_record = 0;
      }

    sfree (dtp->u.p.current_unit->s);
--- 2028,2033 ----


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-17 21:33:29
               date|                            |


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
  2005-12-17 21:33 ` [Bug libfortran/25463] " jvdelisle at gcc dot gnu dot org
@ 2005-12-17 22:23 ` tkoenig at gcc dot gnu dot org
  2005-12-19  6:52 ` jvdelisle at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-12-17 22:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tkoenig at gcc dot gnu dot org  2005-12-17 22:23 -------
(In reply to comment #1)
> This simple patch appears to fix this:  The stement moved needs to be executed
> before the return is called.

Yep, this fixes the test case, and doesn't break anything else (at
least nothing that I tried).  Looks good.


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
  2005-12-17 21:33 ` [Bug libfortran/25463] " jvdelisle at gcc dot gnu dot org
  2005-12-17 22:23 ` tkoenig at gcc dot gnu dot org
@ 2005-12-19  6:52 ` jvdelisle at gcc dot gnu dot org
  2005-12-19  7:02 ` jvdelisle at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-19  6:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jvdelisle at gcc dot gnu dot org  2005-12-19 06:52 -------
Subject: Bug 25463

Author: jvdelisle
Date: Mon Dec 19 06:52:33 2005
New Revision: 108784

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108784
Log:
2005-12-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/25463
        * io/transfer.c (finalize_transfer): Fix execution order so that
        next_record is set to zero in all cases.

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


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-12-19  6:52 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-19  7:02 ` jvdelisle at gcc dot gnu dot org
  2005-12-19  7:03 ` jvdelisle at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-19  7:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2005-12-19 07:02 -------
Subject: Bug 25463

Author: jvdelisle
Date: Mon Dec 19 07:02:05 2005
New Revision: 108785

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108785
Log:
2005-12-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/25463
        * gfortran.dg/advance.f90: New test.

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


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-12-19  7:02 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-19  7:03 ` jvdelisle at gcc dot gnu dot org
  2005-12-21  4:50 ` jvdelisle at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-19  7:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2005-12-19 07:03 -------
Commited to 4.2  Will commit to 4.1 in ~24 hours.


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-12-19  7:03 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-21  4:50 ` jvdelisle at gcc dot gnu dot org
  2005-12-21  5:09 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-21  4:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2005-12-21 04:50 -------
Subject: Bug 25463

Author: jvdelisle
Date: Wed Dec 21 04:50:19 2005
New Revision: 108896

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108896
Log:
2005-12-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/25463
        * io/transfer.c (finalize_transfer): Fix execution order so that
        next_record is set to zero in all cases.

Modified:
    branches/gcc-4_1-branch/libgfortran/ChangeLog
    branches/gcc-4_1-branch/libgfortran/io/transfer.c


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-12-21  4:50 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-21  5:09 ` jvdelisle at gcc dot gnu dot org
  2005-12-23  5:57 ` jvdelisle at gcc dot gnu dot org
  2006-01-01  5:30 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-21  5:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2005-12-21 05:09 -------
Subject: Bug 25463

Author: jvdelisle
Date: Wed Dec 21 05:08:53 2005
New Revision: 108897

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108897
Log:
2005-12-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/25463
        * gfortran.dg/advance.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/advance.f90
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-12-21  5:09 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-23  5:57 ` jvdelisle at gcc dot gnu dot org
  2006-01-01  5:30 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-23  5:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jvdelisle at gcc dot gnu dot org  2005-12-23 05:57 -------
Fixed on 4.1 and 4.2


-- 

jvdelisle at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/25463] T edit descriptor and ADVANCE="no"
  2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-12-23  5:57 ` jvdelisle at gcc dot gnu dot org
@ 2006-01-01  5:30 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01  5:30 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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



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

end of thread, other threads:[~2006-01-01  5:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-17 17:45 [Bug libfortran/25463] New: T edit descriptor and ADVANCE="no" tkoenig at gcc dot gnu dot org
2005-12-17 21:33 ` [Bug libfortran/25463] " jvdelisle at gcc dot gnu dot org
2005-12-17 22:23 ` tkoenig at gcc dot gnu dot org
2005-12-19  6:52 ` jvdelisle at gcc dot gnu dot org
2005-12-19  7:02 ` jvdelisle at gcc dot gnu dot org
2005-12-19  7:03 ` jvdelisle at gcc dot gnu dot org
2005-12-21  4:50 ` jvdelisle at gcc dot gnu dot org
2005-12-21  5:09 ` jvdelisle at gcc dot gnu dot org
2005-12-23  5:57 ` jvdelisle at gcc dot gnu dot org
2006-01-01  5:30 ` pinskia at gcc dot gnu dot 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).