aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
-rw-r--r--gcc/fortran/frontend-passes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 459967d..069ec28 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -3066,9 +3066,10 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
gfc_code *lhs_alloc;
/* Only need to check a single dimension for the A2B2 case for
- bounds checking, the rest will be allocated. */
+ bounds checking, the rest will be allocated. Also check this
+ for A2B1. */
- if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS && m_case == A2B2)
+ if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) && (m_case == A2B2 || m_case == A2B1))
{
gfc_code *test;
gfc_expr *a2, *b1;