integer, allocatable :: a(:), b(:) integer :: i, j allocate(a(1:5), b(1:5)) b = 7 i = 4 j = 5 a(1:i) = b(1:j) end
Produces (3/4) instead of (4/5): At line 7 of file aff.f90 Fortran runtime error: Array bound mismatch, size mismatch for dimension 1 of array 'a' (3/4) -- Summary: Bounds check off by one Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 27766 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39872