public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, fortran, committed] Fix size of matmul calculation for a special case
@ 2017-05-28 14:41 Thomas Koenig
  0 siblings, 0 replies; only message in thread
From: Thomas Koenig @ 2017-05-28 14:41 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

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.

[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 564 bytes --]

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));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-28 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-28 14:41 [patch, fortran, committed] Fix size of matmul calculation for a special case Thomas Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).