http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60795
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #1) > > What is surprising is that r173750, r174030, and r174415 are related to > backtrace handling, so they probably only expose a latent problem(?). > I think it is a lot worse than it appears. call s1 call s2 call s3 end subroutine s1 character(:), dimension(:), allocatable :: s allocate(character(10) :: s(2)) s(1) = 'r' s(2) = 's' print *, 's1: ', size(s), len(s) end subroutine s1 ! ! A variation on a theme? ! subroutine s2 ! This causes an ICE in gfortran ! character(:), dimension(:), allocatable :: s ! allocate(s(2), source='abc') ! s(1) = 'r' ! s(2) = 's' ! print *, 's2:', size(s), len(s) end subroutine s2 ! ! A variation on a theme? ! subroutine s3 ! This causes an ICE in gfortran ! character(:), dimension(:), allocatable :: s ! allocate(s(2), source=['abc','def']) ! allocate(s, source=['abc','def']) ! s(1) = 'r' ! s(2) = 's' ! print *, 's3:', size(s), len(s) end subroutine s3 subroutine y3 ! This causes gfortran to issue an error. Incorrect! ! character(:), dimension(:), allocatable :: s ! allocate(s, source=['abc','def']) ! s(1) = 'r' ! s(2) = 's' ! print *, 's3:', size(s), len(s) end subroutine y3 subroutine t3 ! This causes gfortran to issue an error. Incorrect! ! real, dimension(:), allocatable :: s ! allocate(s, source=[1., 2.]) end subroutine t3 subroutine s4 ! This causes an ICE in gfortran ! character(3), dimension(:), allocatable :: s ! allocate(s(2), source=['abc','def']) ! s(1) = 'r' ! s(2) = 's' ! print *, 's3:', size(s), len(s) end subroutine s4