From 59a6c9d56580c806c493a50c8902fd2177074399 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 16 Jul 2012 12:35:10 +0000 Subject: [PATCH] Restore type attribute comparison PR middle-end/53959 PR bootstrap/53963 * gimple.c (gimple_types_compatible_p_1): Restore type attribute comparison. From-SVN: r189528 --- gcc/ChangeLog | 7 +++++++ gcc/gimple.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7bf2ff5f13..bffd7bce32d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-07-16 H.J. Lu + + PR middle-end/53959 + PR bootstrap/53963 + * gimple.c (gimple_types_compatible_p_1): Restore type attribute + comparison. + 2012-07-16 Bill Schmidt * opts.c (default_option): Add -fvect-cost-model to default options diff --git a/gcc/gimple.c b/gcc/gimple.c index b419591d3ec..4d2a0f5ffde 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3422,6 +3422,10 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p, goto different_types; } + /* If their attributes are not the same they can't be the same type. */ + if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2))) + goto different_types; + /* Do type-specific comparisons. */ switch (TREE_CODE (t1)) { -- 2.30.2