public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/62000] New: Program hangs on print *, func() statement.
@ 2014-08-02 22:55 jannis at teunissen dot net
  2014-08-03  0:08 ` [Bug fortran/62000] " dominiq at lps dot ens.fr
  2014-08-03  0:16 ` dominiq at lps dot ens.fr
  0 siblings, 2 replies; 3+ messages in thread
From: jannis at teunissen dot net @ 2014-08-02 22:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 62000
           Summary: Program hangs on print *, func() statement.
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jannis at teunissen dot net

Code example:
---------------------------
program my_test
  use mpi
  implicit none

  integer :: ierr
  real    :: rr

  call MPI_init(ierr)
  call set_real(rr)
  print *, rr
  print *, get_real()
  call MPI_finalize(ierr)
contains
  real function get_real()
    print *, "FUNC"
    get_real = 1.0
  end function get_real
  subroutine set_real(arg)
    real, intent(out) :: arg
    print *, "SUB"
    arg = 1.0
  end subroutine set_real
end program my_test
---------------------------
Compilation: mpif90 (no flags)
Result:
$ ./a.out 
 SUB
   1.00000000
   ** program hangs indefinitely **

Same result with MPICH instead of OpenMPI (see below). Without MPI, the problem
goes away. If "print *, get_real()" is replaced by:

rr = get_real()
print *, rr

there is again no problem.


Open MPI: 1.6.5
GNU Fortran (Debian 4.9.1-1) 4.9.1
Linux debian 3.13-1-amd64 #1 SMP Debian 3.13.10-1 (2014-04-15) x86_64 GNU/Linux


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

* [Bug fortran/62000] Program hangs on print *, func() statement.
  2014-08-02 22:55 [Bug fortran/62000] New: Program hangs on print *, func() statement jannis at teunissen dot net
@ 2014-08-03  0:08 ` dominiq at lps dot ens.fr
  2014-08-03  0:16 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-08-03  0:08 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
You are using Mac OSX and an invalid recursive I/O, see pr30617.

*** This bug has been marked as a duplicate of bug 30617 ***


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

* [Bug fortran/62000] Program hangs on print *, func() statement.
  2014-08-02 22:55 [Bug fortran/62000] New: Program hangs on print *, func() statement jannis at teunissen dot net
  2014-08-03  0:08 ` [Bug fortran/62000] " dominiq at lps dot ens.fr
@ 2014-08-03  0:16 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-08-03  0:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> You are using Mac OSX and an invalid recursive I/O, see pr30617.

I did not look at the end of the report. So apparently recursive I/O hangs also
on Linux debian and MPI(?). Without the MPI stuff the code hangs on darwin, but
not on gcc version 4.6.3 20120306 (Red Hat 4.6.3-2).


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

end of thread, other threads:[~2014-08-03  0:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02 22:55 [Bug fortran/62000] New: Program hangs on print *, func() statement jannis at teunissen dot net
2014-08-03  0:08 ` [Bug fortran/62000] " dominiq at lps dot ens.fr
2014-08-03  0:16 ` dominiq at lps dot ens.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).