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: dwarf2out tree expression expansion improvements


> 
> s/operatoins/operations/

Oops, thanks fixed in my clocal copy.

> 
> > + 	 It should not be common case however.  */
> > +       expansion_failed (NULL_TREE, rtl,
> > + 			"Multipart value can not be used in value expression.\n");
> > +       return 0;
> > +       break;
> > + 
> >       case EQ:
> >         op = DW_OP_eq;
> >         goto do_scompare;
> 
> The above two, especially the latter, look very dangerous to me.  The
> problem is that DW_OP_{,bit_}piece (and also DW_OP_stack_value which must be
> followed by one of these) must be always at the top level of the location
> expression, but mem_loc_descriptor is called recursively, so if it handles
> these and is surrounded by anything that adds some operations after it, we
> generate invalid debug info.
> 
> That's the reason for the mem_loc_descriptor vs. loc_descriptor separation,
> loc_descriptor is the toplevel one, which handles stuff that can only be
> handled/appear at the toplevel, while mem_loc_descriptor recurses.
> loc_descriptor already handles CONCAT, CONCATN, REG, VAR_LOCATION etc.

OK, I included those two cases only becuase they trigger ICE in Ada
bootstrap otherwise.  I can either just include the cases and make
mem_loc_descriptor to return 0 (with failure message we might want to
handle later, but it seems very rare case given that it trigger only in
ada) or do you imply that the caller is already wrong to call
mem_loc_descriptor on those?

Honza
> 
> 	Jakub


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