diff options
author | Richard Guenther <rguenther@suse.de> | 2009-10-27 11:30:59 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-10-27 11:30:59 +0000 |
commit | b23dc2c0f588e909cd952bf9525a78231d6dcac9 (patch) | |
tree | e02553c41f0144b180bd12627d33203b1714ceb3 /gcc | |
parent | b8b394019a87a2faeb53196b81616ceb62c96cbd (diff) | |
download | gcc-b23dc2c0f588e909cd952bf9525a78231d6dcac9.zip gcc-b23dc2c0f588e909cd952bf9525a78231d6dcac9.tar.gz gcc-b23dc2c0f588e909cd952bf9525a78231d6dcac9.tar.bz2 |
re PR lto/41821 (ICE in LTO when linking)
2009-10-27 Richard Guenther <rguenther@suse.de>
PR lto/41821
* gimple.c (gimple_types_compatible_p): Handle OFFSET_TYPE.
From-SVN: r153589
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gimple.c | 13 |
2 files changed, 17 insertions, 1 deletions
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 <rguenther@suse.de> + + PR lto/41821 + * gimple.c (gimple_types_compatible_p): Handle OFFSET_TYPE. + 2009-10-27 Aldy Hernandez <aldyh@redhat.com> 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: { |