This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/43983] var-tracking needlessly throws away location info for SRAed vars
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2010 20:02:43 -0000
- Subject: [Bug debug/43983] var-tracking needlessly throws away location info for SRAed vars
- References: <bug-43983-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-05-05 20:02 -------
(In reply to comment #3)
> Two issues discovered with the patch. One is easy:
> --- gcc/dwarf2out.c 2010-05-05 17:14:56.000000000 +0200
> +++ gcc/dwarf2out.c 2010-05-05 20:51:40.000000000 +0200
> @@ -7916,7 +7916,7 @@
> {
> rtx piece = *piece_loc;
> diff -= decl_piece_bitsize (piece);
> - piece_loc = &XEXP (piece, 1);
> + *piece_loc = XEXP (piece, 1);
> free_EXPR_LIST_node (piece);
> }
> /* Add padding if needed. */
>
> The other shows on various libgcc files with -m32 - apparently SRA leaves
> sometimes the original decl in the IL together with SRAed variables, the patch
> assumed that either the SRAed variables, or the original appear, but not both.
It indeed happens on purpose. We in some cases re-build the aggregate
for aggregate uses.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43983