aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-08-12 15:10:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-08-12 15:10:47 +0000
commitdaad02781a10022ac810312c46fda483809c3634 (patch)
tree637efc702dde071c504b6d68951b06bfb3f2b5c1 /gcc/tree-ssa.c
parent30de16328a546dd06011235d86ef573dc2ffba6e (diff)
downloadgcc-daad02781a10022ac810312c46fda483809c3634.zip
gcc-daad02781a10022ac810312c46fda483809c3634.tar.gz
gcc-daad02781a10022ac810312c46fda483809c3634.tar.bz2
alias.c (get_alias_set): Honor TYPE_STRUCTURAL_EQUALITY_P.
2009-08-12 Richard Guenther <rguenther@suse.de> * alias.c (get_alias_set): Honor TYPE_STRUCTURAL_EQUALITY_P. * gimplify.c (gimplify_modify_expr): Do not use lang_hooks.types_compatible_p. * tree-ssa.c (useless_type_conversion_p): For aggregates just return false if the canonical types differ. From-SVN: r150695
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 97e15ae..a402703 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1102,17 +1102,12 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
return true;
}
- /* For aggregates we may need to fall back to structural equality
- checks. */
+ /* For aggregates we rely on TYPE_CANONICAL exclusively and require
+ explicit conversions for types involving to be structurally
+ compared types. */
else if (AGGREGATE_TYPE_P (inner_type)
&& TREE_CODE (inner_type) == TREE_CODE (outer_type))
- {
- if (TYPE_STRUCTURAL_EQUALITY_P (outer_type)
- || TYPE_STRUCTURAL_EQUALITY_P (inner_type))
- return lang_hooks.types_compatible_p (inner_type, outer_type);
-
- return false;
- }
+ return false;
return false;
}