diff mbox

[Ada] Fix problematic assertion

Message ID 2686601.Wjl0rYlL5K@polaris
State New
Headers show

Commit Message

Eric Botcazou Nov. 13, 2016, 6:38 p.m. UTC
Tested on x86_64-suse-linux, applied on all active branches.


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.

-- 
Eric Botcazou
diff mbox

Patch

Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 324888)
+++ gcc-interface/decl.c	(revision 324889)
@@ -388,7 +388,8 @@  gnat_to_gnu_entity (Entity_Id gnat_entit
      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)