diff mbox

Properly set target/optimization options for thunks in free_lang_data

Message ID 20160515221841.GA33559@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka May 15, 2016, 10:18 p.m. UTC
Hi,
this patch updates free lang data to also set target/optimization flags for
thunks. This is because we eventually may produce a body for the thunk and it needs
to be compiled with correct settings.

Bootstrapped/regtested x86_64-linux, will commit it tomorrow.

Honza

	* tree.c (free_lang_data_in_decl): Also set target/optimization flags
	for thunks.
diff mbox

Patch

Index: tree.c
===================================================================
--- tree.c	(revision 236211)
+++ tree.c	(working copy)
@@ -5418,7 +5418,7 @@  free_lang_data_in_decl (tree decl)
 	      DECL_INITIAL (decl) = error_mark_node;
 	    }
 	}
-      if (gimple_has_body_p (decl))
+      if (gimple_has_body_p (decl) || (node && node->thunk.thunk_p))
 	{
 	  tree t;