This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 10/10] debug-early merge: compiler proper
- From: Jason Merrill <jason at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 May 2015 15:32:41 -0400
- Subject: Re: [patch 10/10] debug-early merge: compiler proper
- Authentication-results: sourceware.org; auth=none
- References: <554C060F dot 6000609 at redhat dot com> <CAFiYyc16u2na9VeyMb5cVf4cH=caiBy6PRTJkX9DndzHcFxkBQ at mail dot gmail dot com> <555CAD35 dot 5040304 at redhat dot com> <5565BB13 dot 6040205 at redhat dot com> <5567643C dot 1020306 at redhat dot com> <55677C05 dot 6040302 at redhat dot com> <5568B32A dot 1010100 at redhat dot com>
On 05/29/2015 02:42 PM, Aldy Hernandez wrote:
unsigned int i=555;
int main()
{
unsigned int array[i];
...
}
For the VLA, I'd like to check if we have an array type with a missing
DW_AT_{upper,lower}_bound late in the game, and fill it in.
During early dwarf we only have an uninitialized gimple register
representing the bound
Ah, I see, from gimplify_type_sizes.
and loc_list_from_tree() cannot find the RTL
with the final bound location. Thus, we end up with a missing bound,
which I propose to fill in late dwarf.
OK, that makes sense. I wonder if we should emit debug info for the
gimple register; that would allow us to fill in the bound during early
dwarf.
Obviously I was doing some nonsense with TYPE_SIZE != INTEGER_CST, when
in reality I should probably check that TREE_CODE (type) == ARRAY_TYPE
and that we are missing the bound late (by looking for DW_AT_*_bound in
the cached DIE).
But this sounds reasonable.
Jason