diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-08 21:08:21 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-08 20:08:21 +0000 |
commit | 9641fab348e41e7f9d05553fe9c778ce91c86332 (patch) | |
tree | f74e46cf83945e5d96a8c78c3d8cb1fd5c4fe28e /gcc/cgraphunit.c | |
parent | 91480ff35011b73b2debcea1d88090d9165473aa (diff) | |
download | gcc-9641fab348e41e7f9d05553fe9c778ce91c86332.zip gcc-9641fab348e41e7f9d05553fe9c778ce91c86332.tar.gz gcc-9641fab348e41e7f9d05553fe9c778ce91c86332.tar.bz2 |
re PR ipa/63566 (i686 bootstrap fails: ICE RTL flag check: INSN_UID used with unexpected rtx code 'set' in INSN_UID, at rtl.h:1326)
PR ipa/63566
* cgraphunit.c (cgraph_node::analyze): Be sure target of thunk is
aliases before trying to expand it.
(cgraph_node::expand_thunk): Fix formating.
From-SVN: r220518
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 35b244e..8280fc4 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -580,8 +580,19 @@ cgraph_node::analyze (void) if (thunk.thunk_p) { - create_edge (cgraph_node::get (thunk.alias), - NULL, 0, CGRAPH_FREQ_BASE); + cgraph_node *t = cgraph_node::get (thunk.alias); + + create_edge (t, NULL, 0, CGRAPH_FREQ_BASE); + /* Target code in expand_thunk may need the thunk's target + to be analyzed, so recurse here. */ + if (!t->analyzed) + t->analyze (); + if (t->alias) + { + t = t->get_alias_target (); + if (!t->analyzed) + t->analyze (); + } if (!expand_thunk (false, false)) { thunk.alias = NULL; @@ -1515,7 +1526,8 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) current_function_decl = thunk_fndecl; /* Ensure thunks are emitted in their correct sections. */ - resolve_unique_section (thunk_fndecl, 0, flag_function_sections); + resolve_unique_section (thunk_fndecl, 0, + flag_function_sections); DECL_RESULT (thunk_fndecl) = build_decl (DECL_SOURCE_LOCATION (thunk_fndecl), @@ -1568,7 +1580,8 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) current_function_decl = thunk_fndecl; /* Ensure thunks are emitted in their correct sections. */ - resolve_unique_section (thunk_fndecl, 0, flag_function_sections); + resolve_unique_section (thunk_fndecl, 0, + flag_function_sections); DECL_IGNORED_P (thunk_fndecl) = 1; bitmap_obstack_initialize (NULL); |