[patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-17 Thread Thomas Koenig
Hello world, the attached patch fixes the PR by looking at the function interface if one exists. Regression-tested. OK for trunk? Regards Thomas 2017-11-17 Thomas Koenig PR fortran/83012 * expr.c (gfc_is_simply_contiguous): If a function call through a clas

Re: [patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-17 Thread Paul Richard Thomas
Hi Thomas, This is OK. Thanks Paul On 17 November 2017 at 17:38, Thomas Koenig wrote: > Hello world, > > the attached patch fixes the PR by looking at the function interface if > one exists. > > Regression-tested. OK for trunk? > > Regards > > Thomas > > 2017-11-17 Thomas Koenig >

Re: [patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-17 Thread Steve Kargl
Thomas, Even though Paul OK the patch, I have a question below. On Fri, Nov 17, 2017 at 06:38:20PM +0100, Thomas Koenig wrote: > +{ > + if (expr->value.function.esym) > + return expr->value.function.esym->result->attr.contiguous; > + else > + { > + /* We have to jump

Re: [patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-18 Thread Thomas Koenig
Steve, + for (r = expr->ref; r; r = r->next) + if (r->type == REF_COMPONENT) + rc = r; Should you have a break here? As I understand it, you're walking a list, so you could have r, r->next, r->next->next, and so on. Is it possible to have r->next->type = REF_CO