Commit 9b276dad by Jason Merrill Committed by Jason Merrill

re PR debug/58315 (Excessive memory use with -g)

	PR debug/58315
	* decl.c (start_preparsed_function): Use create_artificial_label
	for cdtor_label.

From-SVN: r220974
parent f66172c4
2015-02-25 Jason Merrill <jason@redhat.com>
PR debug/58315
* decl.c (start_preparsed_function): Use create_artificial_label
for cdtor_label.
2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
Jakub Jelinek <jakub@redhat.com>
......
......@@ -13721,9 +13721,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
|| (DECL_CONSTRUCTOR_P (decl1)
&& targetm.cxx.cdtor_returns_this ()))
{
cdtor_label = build_decl (input_location,
LABEL_DECL, NULL_TREE, void_type_node);
DECL_CONTEXT (cdtor_label) = current_function_decl;
cdtor_label = create_artificial_label (input_location);
}
start_fname_decls ();
......
// PR debug/58315
// { dg-options "-O -g -fdump-tree-einline" }
// { dg-final { scan-tree-dump-not "DEBUG <L0>" "einline" } }
// { dg-final { cleanup-tree-dump "einline" } }
// We used to emit useless NOTE_INSN_DELETED_DEBUG_LABELs for the
// artificial cdtor_label.
struct A
{
~A() {}
};
struct B: A {};
int main()
{
A a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment