[Bug fortran/70070] New: ICE on initializing character data beyond min/max bound

gerhard.steinmetz.fortran@t-online.de gcc-bugzilla@gcc.gnu.org
Thu Mar 3 20:46:00 GMT 2016


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

            Bug ID: 70070
           Summary: ICE on initializing character data beyond min/max
                    bound
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

This code accidentally accesses invalid data :


$ cat z1.f90
program p
   integer :: i
   character(1) :: c
   data (c(i:i), i=1,11) /11*'c'/
end

$ gfortran-6 z1.f90
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/6/f951': free(): invalid next
size (fast): 0x00000000029ac080 ***
...
internal compiler error: Aborted



$ cat z3.f90
program p
   integer :: i
   character(99) :: c
   data (c(i:i), i=1,999) /999*'c'/
end

$ gfortran-6 z3.f90
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/6/f951': free(): invalid next
size (normal): 0x0000000002fa2440 ***
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/6/f951': corrupted double-linked
list: 0x0000000002f226f0 ***


More information about the Gcc-bugs mailing list