This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/69910] ICE with NEWUNIT in module


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]