Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-03-13 Thread Paul Richard Thomas
Dear Mikael, I have been on the road and have only had time for trivial bits and pieces. The weather forecast from tomorrow afternoon onwards is not good and so I think that this patch will get some attention :-) Cheers Paul On 12 March 2015 at 19:04, Mikael Morin wrote: > Hello Paul, > > have

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-03-12 Thread Mikael Morin
Hello Paul, have you had time to look at this again? Mikael

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-13 Thread Mikael Morin
Le 10/02/2015 23:35, Paul Richard Thomas a écrit : > Dear Mikael, dear all, > > Thank you for the previous review. I believe that the attached > responds to all of your comments and correctly compiles the three > testcases that you provided. Two of these have been included in the > original testca

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-11 Thread Dominique d'Humières
Dear Paul, > Le 11 févr. 2015 à 17:57, Paul Richard Thomas > a écrit : > > Dear Dominique, > >> The patch works as advertised! I have two remarks: > > Of course it does :-) ;-) >> >> (1) AFAIU there is no need for a temporary for > > Indeed not. I cannot see how that can be avoided withou

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-11 Thread Paul Richard Thomas
Dear Dominique, > The patch works as advertised! I have two remarks: Of course it does :-) > > (1) AFAIU there is no need for a temporary for Indeed not. I cannot see how that can be avoided without a much more elaborate patch. Frankly, I do not see that it would be warranted. Much better some

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-11 Thread Dominique d'Humières
Dear Paul, The patch works as advertised! I have two remarks: (1) AFAIU there is no need for a temporary for PROGRAM Main INTEGER :: i, index(5) = (/ (i, i = 1,5) /) REAL :: tmp(5), array(5) = (/ (i+0.0, i = 1,5) /) tmp = Fred(index,array) array = tmp PRINT *, array CONT

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-10 Thread Paul Richard Thomas
Dear Mikael, dear all, Thank you for the previous review. I believe that the attached responds to all of your comments and correctly compiles the three testcases that you provided. Two of these have been included in the original testcase and the third appears separately. Bootstrapped and reg test

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-08 Thread Paul Richard Thomas
Dear Mikael, Thank you very much for the review. You raise some points that I had thought about and others that I hadn't. I also realised that such things as blocks, within the elemental function would through the fix as well. I'll defer doing anything with it until tomorrow night. I reason that

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-08 Thread Mikael Morin
Hello Paul, comments below Le 08/02/2015 16:24, Paul Richard Thomas a écrit : > > Index: gcc/fortran/gfortran.h > === > *** gcc/fortran/gfortran.h(revision 220482) > --- gcc/fortran/gfortran.h(working copy) > ***

Re: [Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-08 Thread Paul Richard Thomas
Dear All, Dominique has just flagged up a slight technical problem with the patch... it's not for this PR :-( Please find the correct patch attached. Paul On 8 February 2015 at 12:42, Paul Richard Thomas wrote: > Dear All, > > This came up at > https://groups.google.com/forum/#!topic/comp.lang.

[Patch, fortran] PR64952 - Missing temporary in assignment from elemental function

2015-02-08 Thread Paul Richard Thomas
Dear All, This came up at https://groups.google.com/forum/#!topic/comp.lang.fortran/TvVY5j3GPmg gfortran produces wrong result from: PROGRAM Main INTEGER :: i, index(5) = (/ (i, i = 1,5) /) REAL :: array(5) = (/ (i+0.0, i = 1,5) /) array = Fred(index,array) PRINT *, array CONTAIN