diff options
author | Martin Liska <mliska@suse.cz> | 2014-10-29 16:17:42 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-10-29 15:17:42 +0000 |
commit | 5cf18d250f37b6c86b26d17e0cbb22a0c0d18e03 (patch) | |
tree | 987eee494277d54edfb3a37f24a7b598c944ae9e /gcc/cgraphunit.c | |
parent | 7b310e901c5b7ad8ad54771b2d69459a496da472 (diff) | |
download | gcc-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/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index a86bd1b..6f61f5c 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1550,7 +1550,9 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) else if (!is_gimple_reg_type (restype)) { restmp = resdecl; - add_local_decl (cfun, restmp); + + if (TREE_CODE (restmp) == VAR_DECL) + add_local_decl (cfun, restmp); BLOCK_VARS (DECL_INITIAL (current_function_decl)) = restmp; } else |