aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-09-23 11:11:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-09-23 11:11:48 +0000
commitbe6e26f995d137d8608d6c93c65316b6c3d2617d (patch)
tree43cbc9398722b1229c8f0f9e2b6b54e095281d34 /gcc/tree-ssa-structalias.c
parent40f1d2ab2662c2ed41707a2126ea0c5c9e028653 (diff)
downloadgcc-be6e26f995d137d8608d6c93c65316b6c3d2617d.zip
gcc-be6e26f995d137d8608d6c93c65316b6c3d2617d.tar.gz
gcc-be6e26f995d137d8608d6c93c65316b6c3d2617d.tar.bz2
tree-ssa-structalias.c (intra_create_variable_infos): Build representatives for all restrict qualified pointer destinations.
2015-09-23 Richard Biener <rguenther@suse.de> * tree-ssa-structalias.c (intra_create_variable_infos): Build representatives for all restrict qualified pointer destinations. * g++.dg/tree-ssa/restrict2.C: Un-XFAIL testcase. From-SVN: r228040
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 1767b04..8d81bd4 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5857,12 +5857,12 @@ intra_create_variable_infos (struct function *fn)
{
varinfo_t p = get_vi_for_tree (t);
- /* For restrict qualified pointers to objects passed by
- reference build a real representative for the pointed-to object.
- Treat restrict qualified references the same. */
- if (TYPE_RESTRICT (TREE_TYPE (t))
- && ((DECL_BY_REFERENCE (t) && POINTER_TYPE_P (TREE_TYPE (t)))
- || TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE)
+ /* For restrict qualified pointers build a representative for
+ the pointed-to object. Note that this ends up handling
+ out-of-bound references conservatively by aggregating them
+ in the first/last subfield of the object. */
+ if (POINTER_TYPE_P (TREE_TYPE (t))
+ && TYPE_RESTRICT (TREE_TYPE (t))
&& !type_contains_placeholder_p (TREE_TYPE (TREE_TYPE (t))))
{
struct constraint_expr lhsc, rhsc;