diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-22 19:12:46 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-22 19:12:46 +0000 |
commit | 52a22bc6fc302d2719365e4b75230ffc56075b4e (patch) | |
tree | 7f1fd3b2d30f16cac3db37da0ccba262810b28f0 /gcc/ada/gcc-interface/utils.c | |
parent | 595a5656a11c75c4cda95ad95ac71bd06cac3781 (diff) | |
download | ppe42-gcc-52a22bc6fc302d2719365e4b75230ffc56075b4e.tar.gz ppe42-gcc-52a22bc6fc302d2719365e4b75230ffc56075b4e.zip |
* gcc-interface/utils.c (gnat_types_compatible_p): Don't require strict
equality for the component type of array types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index de0d25c4841..eb65b7d2d4d 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -2080,17 +2080,17 @@ gnat_types_compatible_p (tree t1, tree t2) && TYPE_PRECISION (TREE_TYPE (t1)) == TYPE_PRECISION (TREE_TYPE (t2))) return 1; - /* Array types are also compatible if they are constrained and have - the same component type and the same domain. */ + /* Array types are also compatible if they are constrained and have the same + domain and compatible component types. */ if (code == ARRAY_TYPE - && TREE_TYPE (t1) == TREE_TYPE (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)))))) + TYPE_MAX_VALUE (TYPE_DOMAIN (t2))))) + && gnat_types_compatible_p (TREE_TYPE (t1), TREE_TYPE (t2))) return 1; /* Padding record types are also compatible if they pad the same |