From bc9c6c8a5450f39cfa78f30371fadedd77829b9d Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 27 Oct 2009 11:30:59 +0000 Subject: [PATCH] 2009-10-27 Richard Guenther PR lto/41821 * gimple.c (gimple_types_compatible_p): Handle OFFSET_TYPE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153589 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/gimple.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1698cb9..2f15cba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-27 Richard Guenther + + PR lto/41821 + * gimple.c (gimple_types_compatible_p): Handle OFFSET_TYPE. + 2009-10-27 Aldy Hernandez PR bootstrap/41451 diff --git a/gcc/gimple.c b/gcc/gimple.c index f725a34..0b76677 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3198,7 +3198,8 @@ gimple_types_compatible_p (tree t1, tree t2) || SCALAR_FLOAT_TYPE_P (t1) || FIXED_POINT_TYPE_P (t1) || TREE_CODE (t1) == VECTOR_TYPE - || TREE_CODE (t1) == COMPLEX_TYPE) + || TREE_CODE (t1) == COMPLEX_TYPE + || TREE_CODE (t1) == OFFSET_TYPE) { /* Can't be the same type if they have different alignment, sign, precision or mode. */ @@ -3343,6 +3344,16 @@ gimple_types_compatible_p (tree t1, tree t2) } } + case OFFSET_TYPE: + { + if (!gimple_types_compatible_p (TREE_TYPE (t1), TREE_TYPE (t2)) + || !gimple_types_compatible_p (TYPE_OFFSET_BASETYPE (t1), + TYPE_OFFSET_BASETYPE (t2))) + goto different_types; + + goto same_types; + } + case POINTER_TYPE: case REFERENCE_TYPE: { -- 2.7.4