aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2016-11-13 18:38:09 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-11-13 18:38:09 +0000
commit14b27c53fcbdb8d3bc917345538a9dcb82a52a92 (patch)
tree46e4f15a7d8c92ce2a0bf623e94200fc37b2b0d4
parent83a29ac883f3413c685f8f6a04bd890061831747 (diff)
decl.c (gnat_to_gnu_entity): In assertion about known Esize...
* 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: r242364
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/decl.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e7677b57606..d0144c0f951 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_protect_expr): Also protect only the
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 6f2b0bbfd2d..f531b53c17b 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -349,7 +349,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)