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: [RFC] Slightly improved DWARF2 debug info for Fortran


On Sat, 2006-10-21 at 16:40 -0700, Mark Mitchell wrote:
> Steven Bosscher wrote:
> > On 10/22/06, Mark Mitchell <mark@codesourcery.com> wrote:
> >> Steven Bosscher wrote:
> >>
> >> > +         tree type = TREE_TYPE (node);
> >> > +
> >> >           add_name_and_src_coords_attributes (parm_die, node);
> >> > -         add_type_attribute (parm_die, TREE_TYPE (node),
> >> > +         if (is_fortran ()
> >> > +             && TREE_CODE (node) == PARM_DECL
> >> > +             && TREE_CODE (type) == REFERENCE_TYPE)
> >> > +           type = TREE_TYPE (type);
> >> > +         add_type_attribute (parm_die, type,
> >>
> >> Could this bit be keyed off of the calling convention, rather than off
> >> of is_fortran()?  I think we should be trying to minimize
> >> language-awareness here.  So, if we've set the calling convention
> >> attribute earlier, we could remember that, and then use that here.  That
> >> will make handling future languages with similar calling conventions 
> >> easier.
> > 
> > You mean like, setting a flag somewhen early in the compilation that
> > the language wants to use call-by-reference conventions, and then
> > check for the flag instead of is_fortran()?  Sure, I can do that.
> 
> Right.  I don't claim to be a dwarf2out.c maintainer, though; I think 
> this would be better, but some other folks might not.

I wonder what Ada does here since it has reference passing too.

Laurent



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