+2017-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * frontend-passes.c (matmul_lhs_realloc): Correct
+ allocation size for case A1B2.
+
2017-05-25 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (show_expr): Also replace
break;
case A1B2:
- ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 1);
+ ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 2);
cond = build_logical_expr (INTRINSIC_NE,
get_array_inq_function (GFC_ISYM_SIZE, c, 1),
get_array_inq_function (GFC_ISYM_SIZE, b, 2));
--- /dev/null
+! { dg-do run }
+program main
+ real, dimension(3,2) :: a
+ real, dimension(3) :: bp
+ real, dimension(3) :: res1
+ real, dimension(:), allocatable :: c3
+ real, dimension(2) :: res2
+
+ data a /-2., 3., -5., 7., -11., 13./
+ data bp /-23., -31., -41./
+ data res2 /158., -353./
+
+ c3 = matmul(bp,a)
+ if (size(c3,1) /= 2) call abort
+ if (any(c3 /= res2)) call abort
+
+end program main