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

            Bug ID: 70854
           Summary: ICE in gfc_process_block_locals, at
                    fortran/trans-decl.c:6447
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

The following code with an inner block aborts when combined with
an appropriate option -finit-*. Here "integer" and -finit-integer :


$ cat z1.f90
program p
   integer :: x(2), y(2)
   block
      integer, parameter :: a(2) = 0
      x = a
      block
         y = 0
      end block
   end block
end


$ gfortran-6 -finit-integer=-7 -c z1.f90
internal compiler error: in gfc_process_block_locals, at
fortran/trans-decl.c:6447

$ gfortran-6 -finit-local-zero -c z1.f90
internal compiler error: in gfc_process_block_locals, at
fortran/trans-decl.c:6447

---

Compiles fine without that inner block :

$ cat z2.f90
program p
   integer :: x(2), y(2)
   block
      integer, parameter :: a(2) = 0
      x = a
      y = 0
   end block
end

$ gfortran-6 -finit-integer=-7 -c z2.f90
$ gfortran-6 -finit-local-zero -c z2.f90
# no ICE

Reply via email to