Commit 1f1b69e5 by Eric Botcazou Committed by Eric Botcazou

decl.c: (gnat_to_gnu_entity): In ASIS mode, do not check that access types have a set size.

	* gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
	check that access types have a set size.

From-SVN: r199343
parent 9580628d
2013-05-26 Eric Botcazou <ebotcazou@adacore.com> 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
check that access types have a set size.
2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (vinfo_t): New type and associated vector. * gcc-interface/decl.c (vinfo_t): New type and associated vector.
(components_to_record): Change return type to bool. (components_to_record): Change return type to bool.
Lay out the variants in two passes. Do not force a specific layout for Lay out the variants in two passes. Do not force a specific layout for
......
...@@ -311,8 +311,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -311,8 +311,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
return gnu_decl; return gnu_decl;
} }
/* If this is a numeric or enumeral type, or an access type, a nonzero /* If this is a numeric or enumeral type, or an access type, a nonzero Esize
Esize must be specified unless it was specified by the programmer. */ must be specified unless it was specified by the programmer. Exceptions
are for access-to-protected-subprogram types and all access subtypes, as
another GNAT type is used to lay out the GCC type for them. */
gcc_assert (!Unknown_Esize (gnat_entity) gcc_assert (!Unknown_Esize (gnat_entity)
|| Has_Size_Clause (gnat_entity) || Has_Size_Clause (gnat_entity)
|| (!IN (kind, Numeric_Kind) || (!IN (kind, Numeric_Kind)
...@@ -320,7 +322,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -320,7 +322,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& (!IN (kind, Access_Kind) && (!IN (kind, Access_Kind)
|| kind == E_Access_Protected_Subprogram_Type || kind == E_Access_Protected_Subprogram_Type
|| kind == E_Anonymous_Access_Protected_Subprogram_Type || kind == E_Anonymous_Access_Protected_Subprogram_Type
|| kind == E_Access_Subtype))); || kind == E_Access_Subtype
|| type_annotate_only)));
/* The RM size must be specified for all discrete and fixed-point types. */ /* The RM size must be specified for all discrete and fixed-point types. */
gcc_assert (!(IN (kind, Discrete_Or_Fixed_Point_Kind) gcc_assert (!(IN (kind, Discrete_Or_Fixed_Point_Kind)
......
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