[gfortran] Fix NULL reference types.
Mark Mitchell
mark@codesourcery.com
Thu Aug 19 06:04:00 GMT 2004
Richard Henderson wrote:
>On Wed, Aug 18, 2004 at 02:10:29PM +0100, Paul Brook wrote:
>
>
>>As part of his int_cst sharing work Nathan spotted that gfortran was creating
>>null pointers with REFERENCE_TYPE. Apparently the optimizers [could] assume
>>that a reference type argument is never NULL.
>>
>>
>
>So? We can assume anything, since it would be incorrect to actually
>touch such an argument, would it not?
>
>
I'm not sure what you're asking.
In C++, it's never valid to have a reference to NULL, and so it is safe
for an optimizer to assume that any expression with REFERENCE_TYPE is
non-NULL.
Kenner and I discussed this back in 1998:
http://gcc.gnu.org/ml/gcc-bugs/1998-07/msg00040.html
RTH, do you object to Nathan's documentation patch? It would give us an
easy way to give the optimizers a little more information.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
More information about the Fortran
mailing list