Commit 8dccd19b by David Malcolm Committed by David Malcolm

PR driver/69779: fix bogus cleanup code used by libgccjit affecting s390x

gcc/ChangeLog:
	PR driver/69779
	* gcc.c (driver::finalize): Fix cleanup of "specs".

From-SVN: r233385
parent 61789eed
2016-02-12 David Malcolm <dmalcolm@redhat.com> 2016-02-12 David Malcolm <dmalcolm@redhat.com>
PR driver/69779
* gcc.c (driver::finalize): Fix cleanup of "specs".
2016-02-12 David Malcolm <dmalcolm@redhat.com>
PR driver/69265 PR driver/69265
PR driver/69453 PR driver/69453
* gcc.c (driver::driver): Initialize m_option_suggestions. * gcc.c (driver::driver): Initialize m_option_suggestions.
......
...@@ -9954,8 +9954,20 @@ driver::finalize () ...@@ -9954,8 +9954,20 @@ driver::finalize ()
multilib_os_dir = 0; multilib_os_dir = 0;
multiarch_dir = 0; multiarch_dir = 0;
XDELETEVEC (specs); /* Free any specs dynamically-allocated by set_spec.
specs = 0; These will be at the head of the list, before the
statically-allocated ones. */
if (specs)
{
while (specs != static_specs)
{
spec_list *next = specs->next;
free (const_cast <char *> (specs->name));
XDELETE (specs);
specs = next;
}
specs = 0;
}
for (unsigned i = 0; i < ARRAY_SIZE (static_specs); i++) for (unsigned i = 0; i < ARRAY_SIZE (static_specs); i++)
{ {
spec_list *sl = &static_specs[i]; spec_list *sl = &static_specs[i];
......
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