+2010-07-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/utils.c (gnat_types_compatible_p): Don't require strict
+ equality for the component type of array types.
+
2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
* gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2010-07-13 Laurent GUERBY <laurent@guerby.net>
- PR bootstrap/44458
- * gcc-interface/targtyps.c: Include tm_p.h.
- * gcc-interface/Make-lang.in: Update dependencies.
-
+ PR bootstrap/44458
+ * gcc-interface/targtyps.c: Include tm_p.h.
+ * gcc-interface/Make-lang.in: Update dependencies.
+
2010-07-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Deal with
&& 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
+2010-07-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aggr15.ad[sb]: New test.
+
2010-07-22 Dodji Seketeli <dodji@redhat.com>
PR debug/45024
--- /dev/null
+-- { dg-do compile }\r
+-- { dg-options "-gnatws" }\r
+\r
+package body Aggr15 is\r
+\r
+ function CREATE return DATA_T is\r
+ D : DATA_T;\r
+ begin\r
+ return D;\r
+ end;\r
+\r
+ function ALL_CREATE return ALL_DATA_T is\r
+ C : constant ALL_DATA_T := (others => (others => Create));\r
+ begin\r
+ return C;\r
+ end;\r
+\r
+end Aggr15;\r
--- /dev/null
+package Aggr15 is\r
+\r
+ type T is tagged record\r
+ I : Integer;\r
+ end record;\r
+\r
+ type DATA_T is record\r
+ D : T;\r
+ end record;\r
+\r
+ type ALL_DATA_T is array (1..2, 1..2) of DATA_T;\r
+\r
+ function ALL_CREATE return ALL_DATA_T;\r
+\r
+end Aggr15;\r