https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126386

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Single-character fix...

diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc
index 92678310ffd..70e8ec9e161 100644
--- a/gcc/fortran/frontend-passes.cc
+++ b/gcc/fortran/frontend-passes.cc
@@ -3566,7 +3566,7 @@ matmul_lhs_realloc (gfc_expr *c, gfc_expr *a, gfc_expr
*b,
       ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, a, 1);
       cond = build_logical_expr (INTRINSIC_NE,
                                 get_array_inq_function (GFC_ISYM_SIZE, c, 1),
-                                get_array_inq_function (GFC_ISYM_SIZE, a, 2));
+                                get_array_inq_function (GFC_ISYM_SIZE, a, 1));
       break;

     case A1B2:

Reply via email to