summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-07 08:54:53 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-07 08:54:53 +0000
commita35525557a1e37e40ece1a05d1cffd7ee6c9fdfe (patch)
tree2bd7ee4870a404eae65aa88e36ba3a72231f2af6
parent5215027d365b04789c45a180119b17153bf9034b (diff)
downloadppe42-gcc-a35525557a1e37e40ece1a05d1cffd7ee6c9fdfe.tar.gz
ppe42-gcc-a35525557a1e37e40ece1a05d1cffd7ee6c9fdfe.zip
2009-08-07 Richard Guenther <rguenther@suse.de>
* tree-ssa.c (useless_type_conversion_p_1): Only for types that require structural equality defer to the langhook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150559 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96b291a5ae4..b9304a156bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-07 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa.c (useless_type_conversion_p_1): Only for types
+ that require structural equality defer to the langhook.
+
2009-08-07 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (enum jump_func_type): New value IPA_JF_ANCESTOR, changed
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 0b4cc964ee7..ddd4cfb7456 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1073,11 +1073,11 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
else if (AGGREGATE_TYPE_P (inner_type)
&& TREE_CODE (inner_type) == TREE_CODE (outer_type))
{
- /* ??? This seems to be necessary even for aggregates that don't
- have TYPE_STRUCTURAL_EQUALITY_P set. */
+ if (TYPE_STRUCTURAL_EQUALITY_P (outer_type)
+ || TYPE_STRUCTURAL_EQUALITY_P (inner_type))
+ return lang_hooks.types_compatible_p (inner_type, outer_type);
- /* ??? This should eventually just return false. */
- return lang_hooks.types_compatible_p (inner_type, outer_type);
+ return false;
}
return false;
OpenPOWER on IntegriCloud