diff options
author | Jan Hubicka <jh@suse.cz> | 2010-07-07 03:00:42 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-07-07 01:00:42 +0000 |
commit | 6938f93f2ec91e5c8f68469512593efba643caef (patch) | |
tree | 94d7441216e1549f60d0ca9d9c850b862731a503 /gcc/tree-ssa.c | |
parent | 1d8f4f9171a9bf20221425decc286348bb91ab15 (diff) | |
download | gcc-6938f93f2ec91e5c8f68469512593efba643caef.zip gcc-6938f93f2ec91e5c8f68469512593efba643caef.tar.gz gcc-6938f93f2ec91e5c8f68469512593efba643caef.tar.bz2 |
re PR middle-end/44813 (ipa-split causes ice in ptr_deref_may_alias_decl_p, at tree-ssa-alias.c:173)
PR middle-end/44813
* tree-ssa-uninit.c (ssa_undefined_value_p): Result decl is defined
for functions passed by reference.
* tree.c (needs_to_live_in_memory): RESULT_DECL don't need to live
in memory when passed by reference.
* tree-ssa-ccp.c (get_default_value): Only VAR_DECL is undefined at
beggining.
* ipa-split.c (split_function): Cleanup way return value is passed;
handle SSA DECL_BY_REFERENCE retvals.
* tree-ssa.c (verify_def): Verify that RESULT_DECL is read only when
DECL_BY_REFERENCE is set.
* tree-ssa-structalias.c (get_constraint_for_ssa_var, get_fi_for_callee,
find_what_p_points_to): Handle RESULT_DECL.
* tree-inline.c (declare_return_variable): Get new entry_block argument;
when passing by reference ensure that RESULT_DECL is gimple_val.
(remap_gimple_op_r): Remap RESULT_DECL ssa name.
(remap_gimple_stmt): Handle SSA DECL_BY_REFERENCE returns.
* g++.dg/torture/pr44813.C: New testcase.
* g++.dg/torture/pr44826.C: New testcase.
From-SVN: r161898
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 2ea2e68..f3a7a10 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -638,6 +638,13 @@ verify_def (basic_block bb, basic_block *definition_block, tree ssa_name, if (verify_ssa_name (ssa_name, is_virtual)) goto err; + if (TREE_CODE (SSA_NAME_VAR (ssa_name)) == RESULT_DECL + && DECL_BY_REFERENCE (SSA_NAME_VAR (ssa_name))) + { + error ("RESULT_DECL should be read only when DECL_BY_REFERENCE is set."); + goto err; + } + if (definition_block[SSA_NAME_VERSION (ssa_name)]) { error ("SSA_NAME created in two different blocks %i and %i", |