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