This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Fix NULL reference types.
Daniel Jacobowitz wrote:
RTH's complaint about Fortran and debugging is interesting. Although, I
don't think Fortran has a notion of "reference type" in the same way
that C++ does. It might be that DWARF 2/3 already provides some way of
describing optional arguments that does not rely on their type being
REFERENCE_TYPE. It might also be that we could adjust the
debug-generators to generate reference types even for optional arguments.
The DWARF2 we output really should describe them as being reference
types. The debugger needs to know to pass pointers instead of values,
and to display values instead of pointers; at the debug info level,
that's what the distinction between a pointer and a reference is for.
OK.
I've got no opinion on whether that should be a tree type or a flag on
a pointer type. It seems that keeping the distinction to the tree
optimizers is not useful, aside from the possible non-NULL flag.
It sounds like maybe a flag on never-NULL DECLs is the way to go.
And I hereby apologize to Paul for steering him wrong with respect to
changing gfortran!
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com