This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, 4.5] [RFC] -fruntime-check=<....>
- From: Mikael Morin <mikael dot morin at tele2 dot fr>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Mon, 02 Feb 2009 21:36:12 +0100
- Subject: Re: [Patch, Fortran, 4.5] [RFC] -fruntime-check=<....>
- References: <4985D55E.6090804@net-b.de> <4986216A.80403@tele2.fr> <49862E81.80302@net-b.de>
Tobias Burnus wrote:
> Mikael Morin wrote:
>
>>> a) -fcheck-array-temporaries: Should there also be a
>>> -fruntime-check=array-temporaries ?
>>>
>>>
>> No, as I don't think we could generate a temporary without noticing it
>> at compile time.
>>
>>
>
> I somehow don't understand what you mean here. Do you mean that
> -fcheck-array-temporaries is not useful? Or do you mean that
> -fruntime-check=array-temporaries as alias for -fcheck-array-temporaries
> is not useful?
>
> For the former: I don't agree - I find that option quite helpful and
> also ifort has such an option. Cf. http://gcc.gnu.org/gcc-4.4/changes.html
>
> # The |-Warray-temporaries| option warns about array temporaries generated
> by the compiler, as an aid to optimization.
> # The |-fcheck-array-temporaries| option has been added, printing a
> notification at run time, when an array temporary had to be created for
> an function argument. Contrary to |-Warray-temporaries| the warning is
> only printed if the array is noncontiguous.
>
Ah ok. So the option is already there. Yes, an alias makes sense.
I only knew -Warray-temporaries. And I was confusing it with
-fcheck-array-temporaries.
Is the latter useful? Maybe.
I've never used it, but without knowing its existence it's not
surprising ;).