Commit 251b6a47 by Ed Schonberg Committed by Arnaud Charlet

sem_util.adb (Gather_Components): When gathering components of a nested variant...

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Gather_Components): When gathering components
	of a nested variant, the record type used in legality checks is
	the enclosing record type.

From-SVN: r228865
parent 74e3c262
2015-10-16 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Gather_Components): When gathering components
of a nested variant, the record type used in legality checks is
the enclosing record type.
2015-10-13 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
......
......@@ -7292,10 +7292,11 @@ package body Sem_Util is
end if;
-- If we have found the corresponding choice, recursively add its
-- components to the Into list.
-- components to the Into list. The nested components are part of
-- the same record type.
Gather_Components
(Empty, Component_List (Variant), Governed_By, Into, Report_Errors);
(Typ, Component_List (Variant), Governed_By, Into, Report_Errors);
end Gather_Components;
------------------------
......@@ -16998,7 +16999,7 @@ package body Sem_Util is
begin
-- This is a private type which is not completed yet. This can only
-- happen in a default expression (of a formal parameter or of a
-- record component). Do not expand transient scope in this case
-- record component). Do not expand transient scope in this case.
if No (Typ) then
return False;
......@@ -17104,9 +17105,9 @@ package body Sem_Util is
-- nondiscriminants). That is, the recursive calls are too conservative.
function Has_Discrim_Dep_Array (Typ : Entity_Id) return Boolean;
-- True if we find certain discriminant-dependent array
-- subcomponents. This shouldn't be necessary, but without this check,
-- we crash in gimplify. ???
-- True if we find certain discriminant-dependent array subcomponents.
-- This shouldn't be necessary, but without this check, we crash in
-- gimplify. ???
function Caller_Known_Size_Record (Typ : Entity_Id) return Boolean is
pragma Assert (Typ = Underlying_Type (Typ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment