[Bug fortran/71862] [4.9/5/6/7 Regression] ICE in gfc_add_component_ref, at fortran/class.c:241

gerhard.steinmetz.fortran@t-online.de gcc-bugzilla@gcc.gnu.org
Fri Jul 15 14:00:00 GMT 2016


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

--- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
More test files :


$ cat z5.f90
program p
   type t
      integer :: n = 0
      integer, pointer :: q => null()
   end type
   type(t) :: x
   print *, associated(x%q)
   x = f()
   print *, associated(x%q)
contains
   function f() result (z)
      class(t), allocatable :: z
      print *, associated(z%q)
   end
end


$ cat za1.f90
program p
   class(*), allocatable :: z(:)
   allocate (integer :: z(2))
   select type (z)
   type is (integer)
   end select
end


More information about the Gcc-bugs mailing list