public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30617]  New: recursive I/O hangs under OSX 10.3
@ 2007-01-27 19:47 dominiq at lps dot ens dot fr
  2009-05-07 22:00 ` [Bug libfortran/30617] Implement a run time diagnostic for invalid recursive I/O dominiq at lps dot ens dot fr
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-01-27 19:47 UTC (permalink / raw)
  To: gcc-bugs

The executable of the following code:

external fun
real fun
real a
a = fun()
print *, a
print *, fun()
end
real function fun()
print *, 'test'
fun = 1.0
end

compiled with 4.3.0 20070126, hangs. -fdump-tree-original gives:

MAIN__ ()
{
  real4 a;

  _gfortran_set_std (70, 127, 0, 0);
  a = fun ();
  {
    struct __st_parameter_dt dt_parm.0;

    dt_parm.0.common.filename = "fun_external.f90";
    dt_parm.0.common.line = 5;
    dt_parm.0.common.unit = 6;
    dt_parm.0.common.flags = 128;
    _gfortran_st_write (&dt_parm.0);
    _gfortran_transfer_real (&dt_parm.0, &a, 4);
    _gfortran_st_write_done (&dt_parm.0);
  }
  {
    struct __st_parameter_dt dt_parm.1;

    dt_parm.1.common.filename = "fun_external.f90";
    dt_parm.1.common.line = 6;
    dt_parm.1.common.unit = 6;
    dt_parm.1.common.flags = 128;
    _gfortran_st_write (&dt_parm.1);
    {
      real4 D.951;

      D.951 = fun ();
      _gfortran_transfer_real (&dt_parm.1, &D.951, 4);
    }
    _gfortran_st_write_done (&dt_parm.1);
  }
}


fun ()
{
  real4 __result_fun;

  {
    struct __st_parameter_dt dt_parm.2;

    dt_parm.2.common.filename = "fun_external.f90";
    dt_parm.2.common.line = 9;
    dt_parm.2.common.unit = 6;
    dt_parm.2.common.flags = 128;
    _gfortran_st_write (&dt_parm.2);
    _gfortran_transfer_character (&dt_parm.2, "test", 4);
    _gfortran_st_write_done (&dt_parm.2);
  }
  __result_fun = 1.0e+0;
  return __result_fun;
}

and if run under gdb, after ^C, where gives:

#0  0x90017238 in semaphore_wait_signal_trap ()
#1  0x90001d90 in pthread_mutex_lock ()
#2  0x0020093c in get_external_unit (n=6, do_create=3331) at
../../../gcc-4.3-20070127/libgfortran/../gcc/gthr-posix.h:604
#3  0x001ff6e0 in data_transfer_init (dtp=0x6004d8, read_flag=3331) at
../../../gcc-4.3-20070127/libgfortran/io/transfer.c:1698
#4  0x00002b48 in fun_ () at fun_external.f90:9
#5  0x00002abc in MAIN__ () at fun_external.f90:6
#6  0x00002bac in main (argc=14, argv=0xd03) at
../../../gcc-4.3-20070127/libgfortran/fmain.c:18

Note that I see the same problem on OSX 10.4 with gcc version 4.2.0 20060617.

Any idea around?


-- 
           Summary: recursive I/O hangs under OSX 10.3
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
GCC target triplet: powerpc-apple-darwin7


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


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

end of thread, other threads:[~2020-11-28 22:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-30617-4@http.gcc.gnu.org/bugzilla/>
2013-02-27 18:19 ` [Bug libfortran/30617] Implement a run time diagnostic for invalid recursive I/O dominiq at lps dot ens.fr
2014-05-20 13:58 ` dominiq at lps dot ens.fr
2014-08-03  0:08 ` dominiq at lps dot ens.fr
2014-10-16 13:50 ` jakub at gcc dot gnu.org
2014-10-16 13:57 ` sidio47 at hotmail dot com
2015-08-26 17:12 ` fxcoudert at gcc dot gnu.org
2020-11-28 22:54 ` dominiq at lps dot ens.fr
2007-01-27 19:47 [Bug fortran/30617] New: recursive I/O hangs under OSX 10.3 dominiq at lps dot ens dot fr
2009-05-07 22:00 ` [Bug libfortran/30617] Implement a run time diagnostic for invalid recursive I/O dominiq at lps dot ens dot fr
2009-12-14 20:43 ` dominiq at lps dot ens dot fr
2009-12-14 20:46 ` dominiq at lps dot ens dot fr
2009-12-14 20:52 ` dominiq at lps dot ens dot fr

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).