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
This commit is contained in:
Richard Guenther 2009-10-27 11:30:59 +00:00 committed by Richard Biener
parent b8b394019a
commit b23dc2c0f5
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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:
{