This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 22216 and PR 23651


Looks like I like fixing two PRs at a time.

The problem here is that we keep a reference to a couple of labels that
are only used while expanding. And these labels are later removed and left
unreferenced in the IR. Then these labels keep a reference to a basic block
which was freed.


The fast and easy way to fix this is to zero out the references in
the function struct after expanding.

This is what this patch does. Really these labels could be back local
to expand and not in the function struct since we only expand one function
at a time now but that is a little too invasive for stage3.


OK? Bootstrapped and tested on x86_64-pc-linux-gnu with no regressions.
Also bootstrapped on ia64-linux-gnu.

Thanks,
Andrew Pinski

:ADDPATCH middle-end:

ChangeLog:

	* cfgexpand.c (tree_expand_cfg): After expanding the functions, clear
	out return_label and naked_return_label.

Attachment: t.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]