[Bug fortran/66724] New: ICE on input/output statements with wrong specifier data

gerhard.steinmetz.fortran@t-online.de gcc-bugzilla@gcc.gnu.org
Wed Jul 1 16:23:00 GMT 2015


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

            Bug ID: 66724
           Summary: ICE on input/output statements with wrong specifier
                    data
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

For most input/output statements and for several specifiers
compilation aborts if assigned specifier key is not changeable
(is a constant) and/or is of wrong data type etc.
Several combinations are causing a segfault, some examples :


$ cat z_iostmt_iomsg_1.f90
program p
   backspace (1, iomsg=1)
   close (1, iomsg=1)
   endfile (1, iomsg=1)
   flush (1, iomsg=1)
   inquire (1, iomsg=1)
   open (1, iomsg=1)
   read (1, iomsg=1)
   rewind (1, iomsg=1)
   wait (1, iomsg=1)
   write (1, iomsg=1)
end


$ cat z_open_iomsg.f90
program p
   open (1, iomsg=1)
   open (1, iomsg=1e1)
   open (1, iomsg=1d1)
   open (1, iomsg='no')
   open (1, iomsg='')
   open (1, iomsg=.true.)
   open (1, iomsg=[1])
   open (1, iomsg=[''])
   ! ...
end

# analogous if "open" replaced with some other io-stmt


$ cat z_open_specifier.f90
program p
   open (1, access=.false.)
   open (1, action=.false.)
   open (1, asynchronous=.false.)
   open (1, blank=.false.)
   open (1, decimal=.false.)
   open (1, delim=.false.)
   open (1, encoding=.false.)
   open (1, form=.false.)
   open (1, pad=.false.)
   open (1, position=.false.)
   open (1, round=.false.)
   open (1, sign=.false.)
   open (1, status=.false.)
end

# analogous if "open" replaced with some other io-stmt


$ cat z_write_asynchronous.f90
program p
   write (1, asynchronous=1e1)
   write (1, asynchronous=1d1)
   write (1, asynchronous=.false.)
   write (1, asynchronous=null())
   write (1, asynchronous=[1])
   write (1, asynchronous=[''])
   write (1, asynchronous=['no'])
   ! ...
end

# analogous if "write" replaced with some other io-stmt

# and several more ...


Yields (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit)
f951: internal compiler error: Segmentation fault



More information about the Gcc-bugs mailing list