This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] fix eliminate-unused-debug-types for casts (PR21391)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Sat, 19 Nov 2005 00:59:24 -0500
- Subject: Re: [RFC] fix eliminate-unused-debug-types for casts (PR21391)
- References: <20051116171414.GA31556@redhat.com>
On Wed, Nov 16, 2005 at 01:14:14PM -0400, Aldy Hernandez wrote:
> Hi folks!
>
> The problem in this PR is that we don't emit dwarf information for types
> that are only used as casts.
>
> In the following code, "foo" doesn't get a debugging entry:
>
> struct foo { int i; };
>
> int bar (void) { return ((struct foo *)0x1234)->i; }
>
> Unfortunately, by the time we get to prune_unused_type*, we no longer
> know how the type was used. To fix this problem, I mark all DIEs for
> types that are used as casts in the front-end, and then consider these
> types as used, when we are prunning the unused types.
During parsing, yes? Then we'll mark casts used in parsed but
non-emitted functions as used. Was this patch superseded by the
discussion on gcc@ about enums?
--
Daniel Jacobowitz
CodeSourcery, LLC