]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (gnat_to_gnu_entity): In assertion about known Esize...
authorBob Duff <duff@adacore.com>
Sun, 13 Nov 2016 18:38:16 +0000 (18:38 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 13 Nov 2016 18:38:16 +0000 (18:38 +0000)
* gcc-interface/decl.c (gnat_to_gnu_entity): In assertion about known
Esize, protect with !is_type and change !Unknown_Esize to Known_Esize.

From-SVN: r242365

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

index 93f8eb982a73c6e50f5130d9395633cf087d163d..4e35ef40dbeefe135b659645c40062d54ef72cb2 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-13  Bob Duff  <duff@adacore.com>
+
+       * gcc-interface/decl.c (gnat_to_gnu_entity): In assertion about known
+       Esize, protect with !is_type and change !Unknown_Esize to Known_Esize.
+
 2016-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        Backport from mainline
index d3f30897116a3fed42cef507789824fd19e2e9a3..243758b5631e91342b4aed8c1e23a717be827a04 100644 (file)
@@ -361,7 +361,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
      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 (!is_type
+             || Known_Esize (gnat_entity)
              || Has_Size_Clause (gnat_entity)
              || (!IN (kind, Numeric_Kind)
                  && !IN (kind, Enumeration_Kind)