In this code, the shape of 'a1(1,1:3)' in the initialization of b1 should be 3, but it is appearantly '1 3', i.e. we fail to remove the '1' from the shape-list.
erik:~/gcc$ cat bug.f90 program init implicit none integer, parameter :: a1(2,6) = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, & 11, 12], [2,6]) integer :: b1(3) = a1(1,1:3) end program init erik:~/gcc$ gfortran bug.f90 In file bug.f90:5 integer :: b1(3) = a1(1,1:3) 1 Error: different shape for Array assignment at (1) on dimension 1 (3/1) -- Summary: Inability to get shapes correct in initializations Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: eedelman at gcc dot gnu dot org ReportedBy: eedelman at gcc dot gnu dot org OtherBugsDependingO 29630 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29679