On Mon, May 01, 2017 at 07:21:03PM +0200, Thomas Koenig wrote:
> Hi Steve,
>
> > Why the duplicate code? Seems like an OR is needed.
>
> You are quite right.
>
> Here's an updated patch:
>
> Index: frontend-passes.c
> ===================================================================
> --- frontend-passes.c (Revision 247003)
> +++ frontend-passes.c (Arbeitskopie)
> @@ -3066,9 +3066,10 @@
> 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;
>
> OK for trunk?
>
Yes.
--
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow