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

            Bug ID: 68440
           Summary: ICE on declaring class variable with wrong attribute
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [email protected]
  Target Milestone: ---

This wrong code (class not allocatable nor pointer) :

$ cat z1.f90
subroutine s
   type t
   end type
   class(t), parameter :: x = t()
   class(t), parameter :: y = x
end

$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: in check_alloc_comp_init, at fortran/expr.c:2209

---

$ cat z2.f90
subroutine s
   type t
   end type
   class(t), parameter :: x = t()
   class(t) :: y = x
end

$ gfortran -g -O0 -Wall -fcheck=all z2.f90
f951: internal compiler error: in check_alloc_comp_init, at fortran/expr.c:2209

Reply via email to