This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [VTA, PR41473] drop NULL locations from lists
Jakub wrote:
>> Are you sure the dropping of single_element_loc_list call in the
>> loc->first && loc->last == loc->first case is a good idea?
>> I believe that will force using location lists even when block form could be
>> used for DW_AT_location. ?If loc->first->descr is NULL, the function should
>> just return NULL, otherwise it should create the special single element list
>> so that add_AT_location_description does the right thing.
And I replied:
> I don't think that would mean the same thing: a single-element loc
> list describes a variable whose value is known only for that one
> range, where a block form location expression describes a variable
> that can always be found at the given location.
Hmmm, it looks like add_AT_location_description() is already going to
convert single-element loc lists into a simple block-form location
expression. In the case of a single-element location list where the
range is constrained, is that really the right thing to do?
-cary