https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66111
Bug ID: 66111 Summary: [6 regression] ICE with matmul and vector subscripts Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mikael at gcc dot gnu.org Target Milestone: --- implicit none integer, parameter :: n = 4 integer, dimension(n, n) :: a, b, c integer, dimension(n*n) :: p, res integer, dimension(n) :: v integer :: i p = [ +59, -53, +47, -43, & -37, +31, -29, +23, & +19, -17, +13, -11, & - 7, + 5, - 3, + 2 ] a = reshape(p, shape(a)) b = reshape([(i, i=1, size(a))], shape(b)) v = [ 3, 1, 2, 4] c = matmul(a, b) res = [ + 14, - 22, + 16, - 22, & +150, -158, +128, -138, & +286, -294, +240, -254, & +422, -430, +352, -370 ] !print *,c if (any(c /= reshape(res, shape(c)))) call abort c(:,v) = matmul(a, b) if (any(c(:,v) /= reshape(res, shape(c)))) call abort c(v,:) = matmul(a, b) if (any(c(v,:) /= reshape(res, shape(c)))) call abort end