Avoid leak caused by BLOCK pointing to LABEL_DECL pointing to CODE_LABEL pointing everywhere
Graham Stott
graham.stott@btinternet.com
Sat Sep 4 16:15:00 GMT 2004
Jan,
This patch breaks bootstrap :-(
gcc3.5/gcc/gcc/passes.c: In function `rest_of_clean_state':
gcc3.5/gcc/gcc/passes.c:1637: warning: ISO C90 forbids mixed declarations and code
I can't see how this could have passed bootstrap.
Graham
Jan Hubicka wrote:
> Hi,
>
> Bootstrapped/regtested i686-pc-gnu-linux without gcac
I can't see how did this patch could pass bootstrap!
>
> OK?
> Honza
>
> * passes.c (rest_of_clean_state): Decompose the instruction stream.
>
> Index: passes.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/passes.c,v
> retrieving revision 2.2.4.9
> diff -c -3 -p -r2.2.4.9 passes.c
> *** passes.c 2 Aug 2004 23:11:52 -0000 2.2.4.9
> --- passes.c 3 Sep 2004 20:09:32 -0000
> *************** static void
> *** 1637,1642 ****
> --- 1637,1654 ----
> rest_of_clean_state (void)
> {
> coverage_end_function ();
> + rtx insn, next;
^^^^^^^^^^^^^^ mixing declarions and code breaks bootstrap.
> +
> + /* It is very important to decompose the RTL instruction chain here:
> + debug information keeps pointing into CODE_LABEL insns inside the function
> + body. If these remain pointing to the other insns, we end up preserving
> + whole RTL chain and attached detailed debug info in memory. */
> + for (insn = get_insns (); insn; insn = next)
> + {
> + next = NEXT_INSN (insn);
> + NEXT_INSN (insn) = NULL;
> + PREV_INSN (insn) = NULL;
> + }
>
> /* In case the function was not output,
> don't leave any temporary anonymous types
>
More information about the Gcc-patches
mailing list