From 580a4eedb9004a8f34f5908a286af97642d639c4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 10 Dec 2015 09:12:46 +0000 Subject: [PATCH] tree-ssa-structalias.c (create_function_info_for): Add missing constraint from nonlocal for DECL_RESULT. 2015-12-10 Richard Biener * tree-ssa-structalias.c (create_function_info_for): Add missing constraint from nonlocal for DECL_RESULT. From-SVN: r231496 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-structalias.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f9fc2bd232..c46eef42f8e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-12-10 Richard Biener + + * tree-ssa-structalias.c (create_function_info_for): Add missing + constraint from nonlocal for DECL_RESULT. + 2015-12-10 Richard Biener * tree-if-conv.c: Include params.h. diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index c3508626c6f..ec30e1d6f48 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5631,6 +5631,11 @@ create_function_info_for (tree decl, const char *name, bool add_id, if (DECL_RESULT (decl)) insert_vi_for_tree (DECL_RESULT (decl), resultvi); + if (nonlocal_p + && DECL_RESULT (decl) + && DECL_BY_REFERENCE (DECL_RESULT (decl))) + make_constraint_from (resultvi, nonlocal_id); + gcc_assert (prev_vi->offset < resultvi->offset); prev_vi->next = resultvi->id; prev_vi = resultvi; -- 2.30.2