Re: [patch, Fortran] Fix PR 66041

2015-05-10 Thread Thomas Koenig
Hi Mikael, thanks for the review. Here is what I committed. Regards Thomas 2015-05-10 Thomas Koenig PR fortran/66041 * frontend-passes.c (scalarized_expr): Set correct dimension and shape for the expression to be passed to lbound. Remove trailing ref

Re: [patch, Fortran] Fix PR 66041

2015-05-10 Thread Mikael Morin
Hello, Le 10/05/2015 00:31, Thomas Koenig a écrit : > Am 09.05.2015 um 13:59 schrieb Mikael Morin: >>> + /* We have to get rid of the shape, if thre is one. Do >>> +so by freeing it and calling gfc_resolve to rebuild it, >>> +if necessary.

Re: [patch, Fortran] Fix PR 66041

2015-05-09 Thread Thomas Koenig
Am 09.05.2015 um 13:59 schrieb Mikael Morin: > You also need to remove/free the trailing subreferences. That's right, I did that. Although I will probably never understand why lbound(a) should be different from lbound(a%r)... >> + /* We have to get rid of the shape, if thre is

Re: [patch, Fortran] Fix PR 66041

2015-05-09 Thread Mikael Morin
Hello, Le 09/05/2015 00:11, Thomas Koenig a écrit : > Index: frontend-passes.c > === > --- frontend-passes.c (Revision 222864) > +++ frontend-passes.c (Arbeitskopie) > @@ -2611,14 +2611,40 @@ scalarized_expr (gfc_expr *e_in, gfc_expr

[patch, Fortran] Fix PR 66041

2015-05-08 Thread Thomas Koenig
Hello world, this patch fixes the regression in PR 66041, plus one more case that came up when I looked at this. OK for trunk? Regards, Thomas 2015-05-08 Thomas Koenig PR fortran/66041 * frontend-passes.c (scalarized_expr): Clear as->start, as->end and as->st