public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "longb at cray dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/95119] New: CLOSE hangs when -fopenmp is specified in compilation
Date: Wed, 13 May 2020 22:28:49 +0000	[thread overview]
Message-ID: <bug-95119-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 95119
           Summary: CLOSE hangs when -fopenmp is specified in compilation
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: longb at cray dot com
  Target Milestone: ---

> cat test3.f90
program test
  integer,external :: omp_get_num_threads
              character(len=16) my_status
              open (unit=10, file='test.dat')
              print *, omp_get_num_threads()
              write (10, *) 'weird'
              rewind (10)
              read (10, *) my_status
              close (10)
              open (unit=10, file='test.dat')
              close (unit=10, status=my_status, iostat=ios)
              print *, ios
              close (10, status='delete')
      end program test

Works fine with gfortran 8.3.0:

> gfortran -fopenmp test3.f90
> ./a.out
           1
        5002
>


Hangs with gfortran 9.3.0:

> gfortran -fopenmp test3.f90
> ./a.out
           1
        5002
^C
> module avail gcc

             reply	other threads:[~2020-05-13 22:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 22:28 longb at cray dot com [this message]
2020-05-13 22:35 ` [Bug fortran/95119] " longb at cray dot com
2020-05-14  5:45 ` tkoenig at gcc dot gnu.org
2020-05-14  6:46 ` tkoenig at gcc dot gnu.org
2020-05-14 15:16 ` tkoenig at gcc dot gnu.org
2020-05-14 16:12 ` tkoenig at gcc dot gnu.org
2020-05-14 16:34 ` cvs-commit at gcc dot gnu.org
2020-05-14 16:50 ` [Bug fortran/95119] [9/10 Regression] " tkoenig at gcc dot gnu.org
2020-05-22 14:02 ` cvs-commit at gcc dot gnu.org
2020-05-22 14:08 ` cvs-commit at gcc dot gnu.org
2020-05-22 14:09 ` tkoenig at gcc dot gnu.org
2020-05-22 16:10 ` tkoenig at gcc dot gnu.org
2020-10-18 20:50 ` longb at cray dot com
2020-10-19  5:31 ` tkoenig at gcc dot gnu.org

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-95119-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: link
Be 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).