As noted by Dominique in PR 27766, the following test case is valid: program main real, dimension(2,2) :: result real, dimension(6) :: source real, dimension(2) :: pad
call random_number (source) call random_number (pad) result = reshape(source, shape(result),pad=pad(1:0)) result = reshape(source, shape(result)) end program main Currently, this gets rejected with -fbounds-check ( a regression introduced by a recent patch of mine). -- Summary: [4.4 Regression] In Reshape, SOURCE can be bigger than result Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org OtherBugsDependingO 27766 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38234