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

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Aug 5 19:18:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81296

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
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 (&dt_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 = &person_01;
      _gfortran_transfer_derived (&dt_parm.9, &class.10, pwf);
    }
    _gfortran_st_write_done (&dt_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 (&dt_parm.11);
    {
      struct person * D.3598;

      D.3598 = &person_01;
      _gfortran_transfer_character_write (&dt_parm.11, &D.3598->name, 40);
      _gfortran_transfer_integer_write (&dt_parm.11, &D.3598->age, 4);
    }
    _gfortran_st_write_done (&dt_parm.11);
  }


More information about the Gcc-bugs mailing list