Skip to content
Snippets Groups Projects
Commit d77f073c authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: free garbage vec in coerce_template_parms


coerce_template_parms can create two different vecs for the inner template
arguments, new_inner_args and (potentially) the result of
expand_template_argument_pack.  One or the other, or possibly both, end up
being garbage: in the typical case, the expanded vec is garbage because it's
only used as the source for convert_template_argument.  In some dependent
cases, the new vec is garbage because we decide to return the original args
instead.  In these cases, ggc_free the garbage vec to reduce the memory
overhead of overload resolution.

gcc/cp/ChangeLog:

	* pt.cc (coerce_template_parms): Free garbage vecs.

Co-authored-by: default avatarRichard Biener <rguenther@suse.de>
parent 547219f4
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment