http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57354
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |burnus at gcc dot gnu.org, | |pault at gcc dot gnu.org --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- Slightly reduced example. The problem seems to be if the LHS and the RHS are the same for one of the RHSlements: type t integer,allocatable :: i end type type(t) :: e type(t), allocatable :: a(:) e%i = 1 ! Realloc on assignment: OK a = [e] ! OK e%i = 2 ! OK a = [a, e] ! <<<<<< Wrong result print *, (a(i)%i,i=1,2) end