This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/52178] [4.7 regression] Ada bootstrap failure in LTO mode
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Feb 2012 12:29:36 +0000
- Subject: [Bug lto/52178] [4.7 regression] Ada bootstrap failure in LTO mode
- Auto-submitted: auto-generated
- References: <bug-52178-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52178
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-13 12:29:36 UTC ---
On Mon, 13 Feb 2012, ebotcazou at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52178
>
> --- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-13 12:17:46 UTC ---
> > Sth I'm not very familiar is the QUAL_UNION record kinds - maybe you
> > can eye the two merging machineries for obvious errors here?
>
> I did, and only came up with the following no-op patchlet:
>
> Index: gimple.c
> ===================================================================
> --- gimple.c (revision 184143)
> +++ gimple.c (working copy)
> @@ -4140,9 +4140,7 @@ iterative_hash_gimple_type (tree type, h
> v = iterative_hash_hashval_t (na, v);
> }
>
> - if (TREE_CODE (type) == RECORD_TYPE
> - || TREE_CODE (type) == UNION_TYPE
> - || TREE_CODE (type) == QUAL_UNION_TYPE)
> + if (RECORD_OR_UNION_TYPE_P (type))
> {
> unsigned nf;
> tree f;
> @@ -4373,9 +4371,7 @@ iterative_hash_canonical_type (tree type
> v = iterative_hash_hashval_t (na, v);
> }
>
> - if (TREE_CODE (type) == RECORD_TYPE
> - || TREE_CODE (type) == UNION_TYPE
> - || TREE_CODE (type) == QUAL_UNION_TYPE)
> + if (RECORD_OR_UNION_TYPE_P (type))
> {
> unsigned nf;
> tree f;
I see. I came up with the following, but it's unlikely to make a
difference either
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c (revision 184151)
+++ gcc/gimple.c (working copy)
@@ -3549,10 +3549,6 @@ gimple_types_compatible_p_1 (tree t1, tr
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))
{
@@ -4589,10 +4585,6 @@ gimple_canonical_types_compatible_p (tre
return true;
}
- /* If their attributes are not the same they can't be the same type.
*/
- if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2)))
- return false;
-
/* Do type-specific comparisons. */
switch (TREE_CODE (t1))
{
@@ -4646,13 +4638,6 @@ gimple_canonical_types_compatible_p (tre
}
case METHOD_TYPE:
- /* Method types should belong to the same class. */
- if (!gimple_canonical_types_compatible_p
- (TYPE_METHOD_BASETYPE (t1), TYPE_METHOD_BASETYPE (t2)))
- return false;
-
- /* Fallthru */
-
case FUNCTION_TYPE:
/* Function types are the same if the return type and arguments
types
are the same. */