aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-05-26 10:23:23 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-05-26 10:23:23 +0000
commit1f1b69e56f6bbc82cbd134dbbfe1743c92fb17d7 (patch)
treece2e7bd0d880effbe4b021a95660ce50180d3b6a /gcc/ada/gcc-interface/decl.c
parent9580628d89a0e31314fcd893297ce550dd2ca0f8 (diff)
downloadgcc-1f1b69e56f6bbc82cbd134dbbfe1743c92fb17d7.zip
gcc-1f1b69e56f6bbc82cbd134dbbfe1743c92fb17d7.tar.gz
gcc-1f1b69e56f6bbc82cbd134dbbfe1743c92fb17d7.tar.bz2
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
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 26e3944..31bdf5b 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -311,8 +311,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
return gnu_decl;
}
- /* If this is a numeric or enumeral type, or an access type, a nonzero
- Esize must be specified unless it was specified by the programmer. */
+ /* If this is a numeric or enumeral type, or an access type, a nonzero Esize
+ 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)
|| Has_Size_Clause (gnat_entity)
|| (!IN (kind, Numeric_Kind)
@@ -320,7 +322,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& (!IN (kind, Access_Kind)
|| kind == E_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. */
gcc_assert (!(IN (kind, Discrete_Or_Fixed_Point_Kind)