This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/83436] New: Internal file cannot be accessed by UNFORMATTED data transfer when reading from /dev/urandom
- From: "daanvanvugt at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Dec 2017 13:06:55 +0000
- Subject: [Bug fortran/83436] New: Internal file cannot be accessed by UNFORMATTED data transfer when reading from /dev/urandom
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83436
Bug ID: 83436
Summary: Internal file cannot be accessed by UNFORMATTED data
transfer when reading from /dev/urandom
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: daanvanvugt at gmail dot com
Target Milestone: ---
With the update to 7.2.1 the following code fragment starts failing:
Fortran runtime error: Internal file cannot be accessed by UNFORMATTED data
transfer
!> Read an int from /dev/urandom
subroutine read_urandom_int(seed, ierr)
implicit none
integer, intent(out) :: seed
integer, intent(out) :: ierr
integer :: un
open(newunit=un, file="/dev/urandom", access="stream", &
form="unformatted", action="read", status="old", iostat=ierr)
if (ierr == 0) then
read(un) seed
close(un)
end if
end subroutine read_urandom_int
I think this might be a regression. The same code works just fine in intel
compiler and older gfortran versions.