public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jannis at teunissen dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/62000] New: Program hangs on print *, func() statement. Date: Sat, 02 Aug 2014 22:55:00 -0000 [thread overview] Message-ID: <bug-62000-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2014-08-02 22:55 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-02 22:55 jannis at teunissen dot net [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-62000-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).