Hello world,

I have just committed as obvious a patch fixing a wrong
calculation for allocating the size of a return variable
in inline matmul (PR 80904).  I will backport to the
other affected branches in the near future.

Regards

        Thomas

2017-05-28  Thomas Koenig  <tkoe...@gcc.gnu.org>

        * frontend-passes.c (matmul_lhs_realloc):  Correct
        allocation size for case A1B2.

2017-05-28  Thomas Koenig  <tkoe...@gcc.gnu.org>

        * gfortran.dg/matmul_bounds_12.f90:  New test.
Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 248467)
+++ frontend-passes.c	(Arbeitskopie)
@@ -2447,7 +2447,7 @@ matmul_lhs_realloc (gfc_expr *c, gfc_expr *a, gfc_
       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));

Reply via email to