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

--- Comment #8 from anlauf at gcc dot gnu.org ---
Reduced testcase:

program test
  implicit none 
  type :: item
     class(*), allocatable :: val
  end type item
  type(item) :: items(1)
! items(1) =  item(42)   ! works
  items(:) = [item(42)]  ! crashes with -m32
end program test

% gfc-16 pr122863-z1.f90 -g -m32 && ./a.out 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0xf7a1c11d in ???
#1  0xf7a1b1fd in ???
#2  0xf7f5558f in ???
#3  0x8048577 in __copy_INTEGER_4_
        at /home/anlauf/gcc-bugs/pr122863-z1.f90:1
#4  0x804883b in test
        at /home/anlauf/gcc-bugs/pr122863-z1.f90:8
#5  0x804892a in main
        at /home/anlauf/gcc-bugs/pr122863-z1.f90:9

Reply via email to