decl.c: (gnat_to_gnu_entity): In ASIS mode, do not check that access types have a...
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 26 May 2013 10:23:23 +0000 (10:23 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 26 May 2013 10:23:23 +0000 (10:23 +0000)
* gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
check that access types have a set size.

From-SVN: r199343

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index efe59e0fcfaba9cdfb966ee7a9f67742cd2c0f9c..b9d47e2fa1b2ab0c83f13017a50d81654bea7959 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 26e3944df3787052b5759df6f7385c2e376bf449..31bdf5b13f8c7838e8681bb0b2695933adeb855b 100644 (file)
@@ -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)