Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-25 Thread Steve Kargl
On Thu, Jan 25, 2018 at 11:07:04AM -0800, Steve Kargl wrote: > On Thu, Jan 25, 2018 at 07:58:22PM +0100, Thomas Koenig wrote: > > Hi Steve, > > > > thanks for your explanations. > > > > The patch is OK for trunk. Thanks a lot! > > > > Upon even further reading, the code segment with temp might

Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-25 Thread Steve Kargl
On Thu, Jan 25, 2018 at 07:58:22PM +0100, Thomas Koenig wrote: > Hi Steve, > > thanks for your explanations. > > The patch is OK for trunk. Thanks a lot! > Upon even further reading, the code segment with temp might be needed. If one looks in compute_dot_product(), one finds result =

Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-25 Thread Thomas Koenig
Hi Steve, thanks for your explanations. The patch is OK for trunk. Thanks a lot! Regards Thomas

Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-25 Thread Steve Kargl
On Thu, Jan 25, 2018 at 07:06:10AM -0800, Steve Kargl wrote: > On Thu, Jan 25, 2018 at 08:37:54AM +0100, Thomas Koenig wrote: > > > > Second, why do you remove this > > > > > - temp.value.op.op = INTRINSIC_NONE; > > > - temp.value.op.op1 = vector_a; > > > - temp.value.op.op2 = vector_b; > > >

Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-25 Thread Steve Kargl
On Thu, Jan 25, 2018 at 08:37:54AM +0100, Thomas Koenig wrote: > First, why is > > > @@ -2253,22 +2253,19 @@ gfc_simplify_dim (gfc_expr *x, gfc_expr *y) > > gfc_expr* > > gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b) > > { > > + /* If vector_a is a zero-sized array, the

Re: [PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-24 Thread Thomas Koenig
Hi Steve, I have a couple of questions before I have to hurry off to work: First, why is @@ -2253,22 +2253,19 @@ gfc_simplify_dim (gfc_expr *x, gfc_expr *y) gfc_expr* gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b) { + /* If vector_a is a zero-sized array, the result

[PATCH] PR fortran/83998 -- fix dot_product on 0-sized arrays

2018-01-24 Thread Steve Kargl
All, The attach patch fixes a regression with dot_product and zero-sized arrays. I bootstrapped and regression tested the patch on x86_64-*-freebsd. OK to commit? 2018-01-23 Steven G. Kargl PR fortran/83998 * simplify.c (gfc_simplify_dot_product): Deal