[Bug fortran/126386] matmul in combination with multiplication and transpose fails to correctly reallocate result array

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126386

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Thomas Koenig
<[email protected]>:

https://gcc.gnu.org/g:3390b0e262c7f26a440638a78e40866242067cf5

commit r15-11421-g3390b0e262c7f26a440638a78e40866242067cf5
Author: Thomas Koenig <[email protected]>
Date:   Sun Jul 26 13:41:32 2026 +0200

    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):  Fix size calculation of
            A2B1 case.

    gcc/testsuite/ChangeLog:

            PR fortran/126386
            * gfortran.dg/inline_matmul_28.f90: New test.

    (cherry picked from commit 4d855f3af5b18e539585d1d4832470e500323c12)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.