This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26766] [F2003] Recursive I/O still (again) broken
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2006 06:05:29 -0000
- Subject: [Bug fortran/26766] [F2003] Recursive I/O still (again) broken
- References: <bug-26766-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2006-03-21 06:05 -------
Looking at -fdump-tree-original, should the internal unit descriptors in foo
and in main have the same value?
foo (__result, .__result, i)
{
if (*i < 0)
{
_gfortran_copy_string (4, __result, 4, "1234");
}
else
{
{
struct __st_parameter_dt dt_parm.0;
dt_parm.0.common.filename = "pr26766.f90";
dt_parm.0.common.line = 15;
dt_parm.0.internal_unit = (char *) __result;
dt_parm.0.internal_unit_len = 4;
dt_parm.0.internal_unit_desc = 0B; <------ here -------
dt_parm.0.common.unit = 0;
dt_parm.0.format = "(i4.4)";
dt_parm.0.format_len = 6;
dt_parm.0.common.flags = 20480;
_gfortran_st_write (&dt_parm.0);
_gfortran_transfer_integer (&dt_parm.0, (int4 *) i, 4);
_gfortran_st_write_done (&dt_parm.0);
}
}
MAIN__ ()
{
char str[1:4];
static void foo (char[1:4] &, int4, int4 &);
_gfortran_set_std (70, 127, 0);
{
struct __st_parameter_dt dt_parm.1;
dt_parm.1.common.filename = "pr26766.f90";
dt_parm.1.common.line = 4;
dt_parm.1.internal_unit = &str;
dt_parm.1.internal_unit_len = 4;
dt_parm.1.internal_unit_desc = 0B; <------ and Here -------
dt_parm.1.common.unit = 0;
dt_parm.1.format = "(a)";
dt_parm.1.format_len = 3;
dt_parm.1.common.flags = 20480;
_gfortran_st_write (&dt_parm.1);
{
char str.2[4];
int4 C.906 = 1234;
foo ((char[1:4] *) &str.2, 4, &C.906);
_gfortran_transfer_character (&dt_parm.1, (char[1:4] *) &str.2, 4);
}
_gfortran_st_write_done (&dt_parm.1);
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26766