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/66709] New: ICE on formatted io with parameter array specifier fmt


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

            Bug ID: 66709
           Summary: ICE on formatted io with parameter array specifier fmt
           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: ---

Specifying a character array for fmt is legal fortran.
If declared as parameter, compilation fails :


$ cat z_wr_fmt_ice_1.f90
program p
   character(4), parameter :: fmt(1) = '(i8)'
   integer :: n
   read (*, fmt=fmt) n
   write (*, fmt=fmt) n
end


$ cat z_wr_fmt_ice_2.f90
program p
   character(*), parameter :: fmt(1) = '(i8)'
   integer :: n
   read (*, fmt=fmt) n
   write (*, fmt=fmt) n
end


$ cat z_wr_fmt_ice_5.f90
program p
   character(1), parameter :: fmt(4) = ['(', 'i', '8', ')']
   integer :: n
   read (*, fmt=fmt) n
   write (*, fmt=fmt) n
end


yields (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit) :
internal compiler error: in gfc_conv_array_constructor_expr, at
fortran/trans-expr.c:6326


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