tree-ssa-structalias.c (create_function_info_for): Add missing constraint from nonloc...
authorRichard Biener <rguenther@suse.de>
Thu, 10 Dec 2015 09:12:46 +0000 (09:12 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 10 Dec 2015 09:12:46 +0000 (09:12 +0000)
2015-12-10  Richard Biener  <rguenther@suse.de>

* tree-ssa-structalias.c (create_function_info_for): Add missing
constraint from nonlocal for DECL_RESULT.

From-SVN: r231496

gcc/ChangeLog
gcc/tree-ssa-structalias.c

index 6f9fc2bd2320d03014a753bb96bbc9e19b5659da..c46eef42f8e0392bf6de14d9a91e1464dc9abdb4 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-10  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-structalias.c (create_function_info_for): Add missing
+       constraint from nonlocal for DECL_RESULT.
+
 2015-12-10  Richard Biener  <rguenther@suse.de>
 
        * tree-if-conv.c: Include params.h.
index c3508626c6f901e6e4dd91722facfe3d24fcac46..ec30e1d6f482620fa9aa0bbfb4d55dd9e6df280f 100644 (file)
@@ -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;