aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-11-20 09:31:06 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-11-20 09:31:06 +0000
commitdc3221e1e3d3a39d88d2d35103f6f50e3400d7a8 (patch)
treeda4944c9019f08cbd4e0f94ce31956af82630d92 /gcc/alias.c
parent643427d70f7a547a1db8a8492a6a124ff22c0d3a (diff)
downloadgcc-dc3221e1e3d3a39d88d2d35103f6f50e3400d7a8.zip
gcc-dc3221e1e3d3a39d88d2d35103f6f50e3400d7a8.tar.gz
gcc-dc3221e1e3d3a39d88d2d35103f6f50e3400d7a8.tar.bz2
re PR middle-end/83215 (C++: struct with char-array assumed to alias with everything)
2018-11-20 Richard Biener <rguenther@suse.de> PR middle-end/83215 * alias.c (component_uses_parent_alias_set_from): Remove alias-set zero and TYPE_TYPELESS_STORAGE case both already handled in other ways. * g++.dg/tree-ssa/pr83215.C: New testcase. From-SVN: r266305
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 7963ece..835ac82 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -601,8 +601,7 @@ objects_must_conflict_p (tree t1, tree t2)
/* Return the outermost parent of component present in the chain of
component references handled by get_inner_reference in T with the
following property:
- - the component is non-addressable, or
- - the parent has alias set zero,
+ - the component is non-addressable
or NULL_TREE if no such parent exists. In the former cases, the alias
set of this parent is the alias set that must be used for T itself. */
@@ -611,10 +610,6 @@ component_uses_parent_alias_set_from (const_tree t)
{
const_tree found = NULL_TREE;
- if (AGGREGATE_TYPE_P (TREE_TYPE (t))
- && TYPE_TYPELESS_STORAGE (TREE_TYPE (t)))
- return const_cast <tree> (t);
-
while (handled_component_p (t))
{
switch (TREE_CODE (t))
@@ -652,9 +647,6 @@ component_uses_parent_alias_set_from (const_tree t)
gcc_unreachable ();
}
- if (get_alias_set (TREE_TYPE (TREE_OPERAND (t, 0))) == 0)
- found = t;
-
t = TREE_OPERAND (t, 0);
}