aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2014-10-29 16:17:42 +0100
committerMartin Liska <marxin@gcc.gnu.org>2014-10-29 15:17:42 +0000
commit5cf18d250f37b6c86b26d17e0cbb22a0c0d18e03 (patch)
tree987eee494277d54edfb3a37f24a7b598c944ae9e /gcc/function.c
parent7b310e901c5b7ad8ad54771b2d69459a496da472 (diff)
downloadgcc-5cf18d250f37b6c86b26d17e0cbb22a0c0d18e03.zip
gcc-5cf18d250f37b6c86b26d17e0cbb22a0c0d18e03.tar.gz
gcc-5cf18d250f37b6c86b26d17e0cbb22a0c0d18e03.tar.bz2
re PR ipa/63587 (ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112)
PR ipa/63587 * g++.dg/ipa/pr63587-1.C: New test * g++.dg/ipa/pr63587-2.C: New test. * cgraphunit.c (cgraph_node::expand_thunk): Only VAR_DECLs are put to local declarations. * function.c (add_local_decl): Implementation moved from header file, assert introduced for tree type. * function.h: Likewise. From-SVN: r216841
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 85cf103..1ef43c4 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6441,6 +6441,15 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
df_insn_rescan (insn);
}
+/* Add the decl D to the local_decls list of FUN. */
+
+void
+add_local_decl (struct function *fun, tree d)
+{
+ gcc_assert (TREE_CODE (d) == VAR_DECL);
+ vec_safe_push (fun->local_decls, d);
+}
+
namespace {
const pass_data pass_data_match_asm_constraints =