[Bug fortran/81296] derived type I/o problem

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #8 from Aldy Hernandez  ---
Author: aldyh
Date: Wed Sep 13 17:18:00 2017
New Revision: 252521

URL: https://gcc.gnu.org/viewcvs?rev=252521=gcc=rev
Log:
2017-08-21  Jerry DeLisle  

PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.

* gfortran.dg/dtio_12.f90: Update test.

Modified:
branches/range-gen2/gcc/fortran/ChangeLog
branches/range-gen2/gcc/fortran/trans-io.c
branches/range-gen2/gcc/testsuite/ChangeLog
branches/range-gen2/gcc/testsuite/gfortran.dg/dtio_12.f90

[Bug fortran/81296] derived type I/o problem

2017-08-22 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jerry DeLisle  ---
Fixed on trunk and 7.3, closing.

[Bug fortran/81296] derived type I/o problem

2017-08-22 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #6 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed Aug 23 00:41:10 2017
New Revision: 251301

URL: https://gcc.gnu.org/viewcvs?rev=251301=gcc=rev
Log:
2017-08-22  Jerry DeLisle  

Backport from trunk
PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.

* gfortran.dg/dtio_12.f90: Update test.

Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/trans-io.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/dtio_12.f90

[Bug fortran/81296] derived type I/o problem

2017-08-21 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #5 from Jerry DeLisle  ---
Author: jvdelisle
Date: Tue Aug 22 01:02:15 2017
New Revision: 251254

URL: https://gcc.gnu.org/viewcvs?rev=251254=gcc=rev
Log:
2017-08-21  Jerry DeLisle  

PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.

* gfortran.dg/dtio_12.f90: Update test.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-io.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/dtio_12.f90

[Bug fortran/81296] derived type I/o problem

2017-08-20 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #4 from Jerry DeLisle  ---
Created attachment 42012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42012=edit
A patch being tested.

This patch adds a check for the DT descriptor in the format label. Preliminary
test show that this fixes it. Regression testing now.

[Bug fortran/81296] derived type I/o problem

2017-08-05 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #3 from Jerry DeLisle  ---
OK, with the alternate form of the format (aka format statement) the frontend
is not building the correct calls to the user defined procedure.

  {
struct __st_parameter_dt dt_parm.9;

dt_parm.9.common.filename = &"pr81296.f03"[1]{lb: 1 sz: 1};
dt_parm.9.common.line = 56;
dt_parm.9.format = &"( DT (20,3) )"[1]{lb: 1 sz: 1};
dt_parm.9.format_len = 13;
dt_parm.9.common.flags = 67112960;
dt_parm.9.common.unit = 6;
_gfortran_st_write (_parm.9);
{
  struct __class_dtio_01_module_Person_t class.10;

  class.10._vptr = (struct __vtype_dtio_01_module_Person * {ref-all})
&__vtab_dtio_01_module_Person;
  class.10._data = _01;
  _gfortran_transfer_derived (_parm.9, , pwf);
}
_gfortran_st_write_done (_parm.9);
  }
  {
struct __st_parameter_dt dt_parm.11;

dt_parm.11.common.filename = &"pr81296.f03"[1]{lb: 1 sz: 1};
dt_parm.11.common.line = 58;
dt_parm.11.format = &"( DT(15,3) )"[1]{lb: 1 sz: 1};
dt_parm.11.format_len = 12;
dt_parm.11.common.flags = 4096;
dt_parm.11.common.unit = 6;
_gfortran_st_write (_parm.11);
{
  struct person * D.3598;

  D.3598 = _01;
  _gfortran_transfer_character_write (_parm.11, >name, 40);
  _gfortran_transfer_integer_write (_parm.11, >age, 4);
}
_gfortran_st_write_done (_parm.11);
  }

[Bug fortran/81296] derived type I/o problem

2017-07-12 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

Jerry DeLisle  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #2 from Jerry DeLisle  ---
I will have a look.

[Bug fortran/81296] derived type I/o problem

2017-07-03 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-07-03
 CC||jvdelisle at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed. It looks that FORMAT is not (properly?) handled.