This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch, fortran, committed] Fix size of matmul calculation for a special case
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 28 May 2017 16:05:53 +0200
- Subject: [patch, fortran, committed] Fix size of matmul calculation for a special case
- Authentication-results: sourceware.org; auth=none
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 <tkoenig@gcc.gnu.org>
* frontend-passes.c (matmul_lhs_realloc): Correct
allocation size for case A1B2.
2017-05-28 Thomas Koenig <tkoenig@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));