Re: [patch, fortran] Fix 126386, fix size calculation for reallocation for matmul of rank 2 a and rank 1 b.

Paul Richard Thomas <[email protected]> Sun, 26 Jul 2026 13:07:04 +0100
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <CAGkQGi+hmCnwrU6YixM_RGVXPRuAQcAu7Nt_t_=d3VFD72mvmQ@mail.gmail.com>
--0000000000006c14b206578272db
Content-Type: text/plain; charset="UTF-8"

Hello Thomas,

LGTM. OK for mainlining and backporting.

Thanks for the patch.

Paul


On Sun, 26 Jul 2026 at 12:03, Thomas Koenig <[email protected]> wrote:

> Hello world,
>
> What it says in the ChangeLog.
>
> Regression-tested. OK for trunk and backport? (This should be one of the
> safest backports ever :-)
>
> Bets regards
>
>         Thomas
>
> Fix size calculation for reallocation for matmul of rank 2 a and rank 1 b.
>
> This is a rather simple one-character (well, two-bit) fix for th
> calculation of the size of the reallocation of the LHS if that
> is allocatable.
>
> gcc/fortran/ChangeLog:
>
>         PR fortran/126386
>         * frontend-passes.cc (matmul_lhs_realloc):
>
> gcc/testsuite/ChangeLog:
>
>         PR fortran/126386
>         * gfortran.dg/inline_matmul_28.f90: New test.
>

--0000000000006c14b206578272db
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello Thomas,<div><br></div><div>LGTM. OK for mainlining a=
nd backporting.</div><div><br></div><div>Thanks for the patch.</div><div><b=
r></div><div>Paul</div><div><br></div></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 26 Jul =
2026 at 12:03, Thomas Koenig &lt;<a href=3D"mailto:[email protected]">t=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex">Hello world,<br>
<br>
What it says in the ChangeLog.<br>
<br>
Regression-tested. OK for trunk and backport? (This should be one of the<br=
>
safest backports ever :-)<br>
<br>
Bets regards<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Thomas<br>
<br>
Fix size calculation for reallocation for matmul of rank 2 a and rank 1 b.<=
br>
<br>
This is a rather simple one-character (well, two-bit) fix for th<br>
calculation of the size of the reallocation of the LHS if that<br>
is allocatable.<br>
<br>
gcc/fortran/ChangeLog:<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PR fortran/126386<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 * frontend-passes.cc (matmul_lhs_realloc):<br>
<br>
gcc/testsuite/ChangeLog:<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PR fortran/126386<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 * gfortran.dg/inline_matmul_28.f90: New test.<b=
r>
</blockquote></div>

--0000000000006c14b206578272db--