This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] Add warning for creation of array temporaries


Thomas,

OK to commit.

Thanks

Paul

PS The example from Daniel,

SUBROUTINE sub(I)
 REAL, PARAMETER :: PI = 3.1415
 REAL, DIMENSION(:), POINTER   :: I
 I = 2.0 * PI**2 * I
END SUBROUTINE

produces a temporary because the scalarizer makes no attempt to
resolve pointers, for obvious reasons.  We could add a check that the
only pointer on the rhs is the same as that on the lhs, with no
dependencies, and that there are no targets in the rhs expression.
This should be posted on Bugzilla.



On Thu, Jul 24, 2008 at 8:32 AM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> On Thu, 2008-07-24 at 07:56 +0200, Ralf Wildenhues wrote:
>
>
>
>> >     to recurrsive call of gfc_add_loop_ss_code and to call of
>>
>> recursive
>
>> > +Warn about array temporaries generated by the compiler.  The information
>> > +generated by this warning is sometimes useful in optimization, to avoid
>>
>> s/to/in order to/  ?
>>
>> > +such temporaties.
>>
>> temporaries
>>
>
> All fixed.  Thanks!
>
> OK otherwise?
>
>        Thomas
>
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
 --Hitchhikers Guide to the Galaxy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]