Commit 0adef32b by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/37601 (gcc-4.4-20080919 ada build failure)

	PR middle-end/37601
	* gcc-interface/utils.c (gnat_types_compatible_p): Handle
	NULL TYPE_DOMAIN.

From-SVN: r141092
parent dc66391d
2008-10-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/37601
* gcc-interface/utils.c (gnat_types_compatible_p): Handle
NULL TYPE_DOMAIN.
2008-10-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Move code
......@@ -2444,10 +2444,13 @@ gnat_types_compatible_p (tree t1, tree t2)
the same component type and the same domain. */
if (code == ARRAY_TYPE
&& TREE_TYPE (t1) == TREE_TYPE (t2)
&& tree_int_cst_equal (TYPE_MIN_VALUE (TYPE_DOMAIN (t1)),
TYPE_MIN_VALUE (TYPE_DOMAIN (t2)))
&& tree_int_cst_equal (TYPE_MAX_VALUE (TYPE_DOMAIN (t1)),
TYPE_MAX_VALUE (TYPE_DOMAIN (t2))))
&& (TYPE_DOMAIN (t1) == TYPE_DOMAIN (t2)
|| (TYPE_DOMAIN (t1)
&& TYPE_DOMAIN (t2)
&& tree_int_cst_equal (TYPE_MIN_VALUE (TYPE_DOMAIN (t1)),
TYPE_MIN_VALUE (TYPE_DOMAIN (t2)))
&& tree_int_cst_equal (TYPE_MAX_VALUE (TYPE_DOMAIN (t1)),
TYPE_MAX_VALUE (TYPE_DOMAIN (t2))))))
return 1;
/* Padding record types are also compatible if they pad the same
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment