[Bug fortran/69910] ICE with NEWUNIT in module
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 23 01:10:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69910
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Test case:
module newunit_bug
implicit none
contains
subroutine open_file_safe(fname, fstatus, faction, fposition, funit)
character(*), intent(in) :: fname, fstatus, faction, fposition
integer, intent(out) :: funit
integer :: istat
select case (fstatus)
case ('scratch')
open(newunit=funit, status=fstatus, access='sequential', &
form='formatted', iostat=istat)
case default
open(newunit=funit, file=fname, status=fstatus, access='sequential', &
form='formatted', action=faction, position=fposition, iostat=istat)
end select
end subroutine open_file_safe
end module newunit_bug
More information about the Gcc-bugs
mailing list