Commit 76fc4a85 by Pierre-Marie de Rodat

einfo.ads: Comment fix.

gcc/ada/

2017-12-15  Bob Duff  <duff@adacore.com>

	* einfo.ads: Comment fix.

2017-12-15  Piotr Trojanek  <trojanek@adacore.com>

	* s-vercon.adb: Minor style fixes.

2017-12-15  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
	itype that is the type of a discriminant-dependent component.

2017-12-15  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
	analysis is now directed to several specialized routines.
	(Check_Part_Of_Abstract_State): New routine.
	(Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
	involving the item, the single concurrent type, and their respective
	contexts.
	* sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
	concurrent type are now recorded regardless of the SPARK mode.
	* sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
	individual predicates.  A Part_Of reference is legal when it appears
	within the statement list of the object's immediately enclosing
	package.
	(Is_Enclosing_Package_Body): New routine.
	(Is_Internal_Declaration_Or_Body): New routine.
	(Is_Single_Declaration_Or_Body): New routine.
	(Is_Single_Task_Pragma): New routine.

gcc/testsuite/

2017-12-15  Ed Schonberg  <schonberg@adacore.com>

	* gnat.dg/expr_func2.ads, gnat.dg/expr_func2.adb: New testcase.

From-SVN: r255690
parent f5b39f90
2017-12-15 Bob Duff <duff@adacore.com>
* einfo.ads: Comment fix.
2017-12-15 Piotr Trojanek <trojanek@adacore.com>
* s-vercon.adb: Minor style fixes.
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
itype that is the type of a discriminant-dependent component.
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
analysis is now directed to several specialized routines.
(Check_Part_Of_Abstract_State): New routine.
(Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
involving the item, the single concurrent type, and their respective
contexts.
* sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
concurrent type are now recorded regardless of the SPARK mode.
* sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
individual predicates. A Part_Of reference is legal when it appears
within the statement list of the object's immediately enclosing
package.
(Is_Enclosing_Package_Body): New routine.
(Is_Internal_Declaration_Or_Body): New routine.
(Is_Single_Declaration_Or_Body): New routine.
(Is_Single_Task_Pragma): New routine.
2017-12-15 Patrick Bernardi <bernardi@adacore.com>
* gnat_ugn.texi: Regenerate.
......
......@@ -649,7 +649,7 @@ package Einfo is
-- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
-- Each such entity can either have a Discriminant_Constraint, in
-- which case it represents a distinct type from the base type (and
-- will have a list of components and discrimants in the list headed by
-- will have a list of components and discriminants in the list headed by
-- First_Entity) or else no such constraint, in which case it will be a
-- copy of the base type.
--
......
......@@ -38,7 +38,7 @@ package body System.Version_Control is
------------------------
function Get_Version_String
(V : System.Unsigned_Types.Unsigned)
(V : System.Unsigned_Types.Unsigned)
return Version_String
is
S : Version_String;
......
......@@ -39,10 +39,10 @@ package System.Version_Control is
pragma Pure;
subtype Version_String is String (1 .. 8);
-- Eight character string returned by Get_version_String;
-- Eight character string returned by Get_version_String
function Get_Version_String
(V : System.Unsigned_Types.Unsigned)
(V : System.Unsigned_Types.Unsigned)
return Version_String;
-- The version information in the executable file is stored as unsigned
-- integers. This routine converts the unsigned integer into an eight
......
......@@ -366,10 +366,13 @@ package body Sem_Ch6 is
procedure Check_And_Freeze_Type (Typ : Entity_Id) is
begin
-- Skip Itypes created by the preanalysis
-- Skip Itypes created by the preanalysis, and itypes
-- whose scope is another type (i.e. component subtypes
-- that depend on a discriminant),
if Is_Itype (Typ)
and then Scope_Within_Or_Same (Scope (Typ), Def_Id)
and then (Scope_Within_Or_Same (Scope (Typ), Def_Id)
or else Is_Type (Scope (Typ)))
then
return;
end if;
......
......@@ -7380,15 +7380,15 @@ package body Sem_Res is
then
Check_Elab_Call (N);
end if;
end if;
-- The variable may eventually become a constituent of a single
-- protected/task type. Record the reference now and verify its
-- legality when analyzing the contract of the variable
-- (SPARK RM 9.3).
-- The variable may eventually become a constituent of a single
-- protected/task type. Record the reference now and verify its
-- legality when analyzing the contract of the variable
-- (SPARK RM 9.3).
if Ekind (E) = E_Variable then
Record_Possible_Part_Of_Reference (E, N);
end if;
if Ekind (E) = E_Variable then
Record_Possible_Part_Of_Reference (E, N);
end if;
-- A Ghost entity must appear in a specific context
......
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/expr_func2.ads, gnat.dg/expr_func2.adb: New testcase.
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/dflt_init_cond.adb, gnat.dg/dflt_init_cond_pkg.ads: New
......
-- { dg-do compile }
package body Expr_Func2 is
procedure Foo is null;
end Expr_Func2;
package Expr_Func2 is
type T_Index is range 1 .. 255;
type T_Table is array (T_Index range <>) of Boolean;
type T_Variable_Table (N : T_Index := T_Index'First) is record
Table : T_Table (1 .. N);
end record;
type T_A_Variable_Table is access T_Variable_Table;
function Element (A_Variable_Table : T_A_Variable_Table) return Boolean;
private
function Element (A_Variable_Table : T_A_Variable_Table) return Boolean is
(A_Variable_Table.all.Table (1));
procedure Foo;
end Expr_Func2;
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