Commit 8a7988f5 by Arnaud Charlet

[multiple changes]

2004-02-25  Robert Dewar  <dewar@gnat.com>

	* 51osinte.ads, 52osinte.ads, 53osinte.ads, 54osinte.ads,
	55osinte.ads, 56osinte.ads, 5aosinte.ads, 5bosinte.ads,
	5cosinte.ads, 5fosinte.ads, 5gosinte.ads, 5hosinte.ads,
	5iosinte.ads, 5losinte.ads, 5nosinte.ads, 5oosinte.ads,
	5posinte.ads, 5sosinte.ads, 5tosinte.ads, 5vosinte.ads,
	5wosinte.ads, 5zosinte.ads: Move instances of Unchecked_Conversion to
	the defining instance of the type to avoid aliasing problems.
	Fix copyright header.  Fix bad comments in package header.

	* exp_util.adb, prj-part.adb, prj-part.adb: Minor reformatting

2004-02-25  Ed Schonberg  <schonberg@gnat.com>

	* exp_ch2.adb (Param_Entity): Handle properly formals that have been
	rewritten as references when aliased through an address clause.

	* sem_ch4.adb (Try_Indirect_Call): Normalize actuals before checking
	whether call can be interpreted as an indirect call to the result of a
	parameterless function call returning an access subprogram.

2004-02-25  Arnaud Charlet  <charlet@act-europe.fr>

	Code clean up:
	* exp_ch7.adb (Make_Clean): Remove generation of calls to
	Unlock[_Entries], since this is now done by Service_Entries directly.

	* exp_ch9.adb (Build_Protected_Subprogram_Body): ditto.

	* s-tpobop.ads, s-tpobop.adb (PO_Service_Entries): New nested procedure
	Requeue_Call for better code readability. Change spec and update calls:
	PO_Service_Entries now unlock the PO on exit.
	(Protected_Entry_Call, Timed_Protected_Entry_Call): Update calls to
	PO_Service_Entries.

	* s-tposen.ads, s-tposen.adb (Service_Entry): Now unlock the PO on exit.

	* s-taenca.adb, s-tasren.adb: Update calls to PO_Service_Entries.

2004-02-25  Sergey Rybin  <rybin@act-europe.fr>

	* exp_ch9.adb (Build_Simple_Entry_Call): Prevent expanding the
	protected subprogram call and analyzing the result of such expanding
	in case when the called protected subprogram is eliminated.

	* sem_elim.adb (Check_Eliminated): Skip blocks when comparing scope
	names.

2004-02-25  Jerome Guitton  <guitton@act-europe.fr>

	* Makefile.in: Clean ups.

From-SVN: r78436
parent 4ab51fb5
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1999-2001 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a UnixWare (Native THREADS) version of this package. -- This is a UnixWare (Native THREADS) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -243,6 +245,10 @@ package System.OS_Interface is ...@@ -243,6 +245,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1999-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -32,16 +32,17 @@ ...@@ -32,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a LynxOS (Native) version of this package. -- This is a LynxOS (Native) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -246,6 +247,10 @@ package System.OS_Interface is ...@@ -246,6 +247,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1999-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,20 @@ ...@@ -31,16 +32,20 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a HPUX 11.0 (Native THREADS) version of this package. -- This is a HPUX 11.0 (Native THREADS) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- This package encapsulates all direct interfaces to OS services
-- or remove the pragma Elaborate_Body. -- that are needed by children of System.
-- It is designed to be a bottom-level (leaf) package.
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -247,6 +252,10 @@ package System.OS_Interface is ...@@ -247,6 +252,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2000-2003 Ada Core Technologies, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a Solaris (POSIX Threads) version of this package. -- This is a Solaris (POSIX Threads) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -237,6 +239,10 @@ package System.OS_Interface is ...@@ -237,6 +239,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -34,7 +35,15 @@ ...@@ -34,7 +35,15 @@
-- This is the FreeBSD PTHREADS version of this package -- This is the FreeBSD PTHREADS version of this package
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -269,6 +278,9 @@ package System.OS_Interface is ...@@ -269,6 +278,9 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2002-2003 Ada Core Technologies, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a LynxOS (POSIX Threads) version of this package. -- This is a LynxOS (POSIX Threads) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -261,6 +263,10 @@ package System.OS_Interface is ...@@ -261,6 +263,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1998-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,15 +32,17 @@ ...@@ -31,15 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is the DEC Unix 4.0/5.1 version of this package. -- This is the DEC Unix 4.0/5.1 version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- It is designed to be a bottom-level (leaf) package. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -253,6 +256,10 @@ package System.OS_Interface is ...@@ -253,6 +256,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a AIX (Native THREADS) version of this package. -- This is a AIX (Native THREADS) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -252,6 +254,10 @@ package System.OS_Interface is ...@@ -252,6 +254,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1998-2001 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a AIX (FSU THREADS) version of this package. -- This is a AIX (FSU THREADS) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
-- pragma Elaborate_Body; -- pragma Elaborate_Body;
...@@ -246,6 +248,10 @@ package System.OS_Interface is ...@@ -246,6 +248,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1998-2001, Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is the SGI Pthreads version of this package. -- This is the SGI Pthreads version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -242,6 +244,10 @@ package System.OS_Interface is ...@@ -242,6 +244,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2001 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,18 +32,18 @@ ...@@ -31,18 +32,18 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is an Irix (old pthread library) version of this package. -- This is an Irix (old pthread library) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces; with Interfaces;
with Interfaces.C; with Interfaces.C;
with Interfaces.C.Strings; with Interfaces.C.Strings;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
...@@ -269,6 +270,9 @@ package System.OS_Interface is ...@@ -269,6 +270,9 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; -- thread identifier type pthread_t is private; -- thread identifier
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2003, Ada Core Technologies -- -- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -32,16 +32,17 @@ ...@@ -32,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is the HP-UX version of this package. -- This is the HP-UX version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -237,6 +238,10 @@ package System.OS_Interface is ...@@ -237,6 +238,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a GNU/Linux (GNU/LinuxThreads) version of this package. -- This is a GNU/Linux (GNU/LinuxThreads) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -267,6 +269,10 @@ package System.OS_Interface is ...@@ -267,6 +269,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -36,11 +37,12 @@ ...@@ -36,11 +37,12 @@
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -246,6 +248,10 @@ package System.OS_Interface is ...@@ -246,6 +248,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -33,6 +34,9 @@ ...@@ -33,6 +34,9 @@
-- This is the no tasking version -- This is the no tasking version
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2003, Ada Core Technologies -- -- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -37,12 +37,11 @@ ...@@ -37,12 +37,11 @@
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Preelaborate. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a OpenNT/Interix (FSU THREADS) version of this package. -- This is a OpenNT/Interix (FSU THREADS) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -237,6 +239,10 @@ package System.OS_Interface is ...@@ -237,6 +239,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -36,11 +37,12 @@ ...@@ -36,11 +37,12 @@
-- This package includes all direct interfaces to OS services -- This package includes all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -298,6 +300,9 @@ package System.OS_Interface is ...@@ -298,6 +300,9 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
THR_DETACHED : constant := 64; THR_DETACHED : constant := 64;
THR_BOUND : constant := 1; THR_BOUND : constant := 1;
THR_NEW_LWP : constant := 2; THR_NEW_LWP : constant := 2;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2003, Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a Solaris (FSU THREADS) version of this package. -- This is a Solaris (FSU THREADS) version of this package
-- This package includes all direct interfaces to OS services -- This package includes all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -333,6 +335,10 @@ package System.OS_Interface is ...@@ -333,6 +335,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1991-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,16 +32,17 @@ ...@@ -31,16 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a OpenVMS/Alpha version of this package. -- This is a OpenVMS/Alpha version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -358,6 +360,10 @@ package System.OS_Interface is ...@@ -358,6 +360,10 @@ package System.OS_Interface is
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private; type pthread_t is private;
subtype Thread_Id is pthread_t; subtype Thread_Id is pthread_t;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2003, Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,17 +32,17 @@ ...@@ -31,17 +32,17 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is a NT (native) version of this package. -- This is a NT (native) version of this package
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with Interfaces.C.Strings; with Interfaces.C.Strings;
with Unchecked_Conversion;
package System.OS_Interface is package System.OS_Interface is
pragma Preelaborate; pragma Preelaborate;
...@@ -68,7 +69,8 @@ pragma Preelaborate; ...@@ -68,7 +69,8 @@ pragma Preelaborate;
subtype PSZ is Interfaces.C.Strings.chars_ptr; subtype PSZ is Interfaces.C.Strings.chars_ptr;
subtype PCHAR is Interfaces.C.Strings.chars_ptr; subtype PCHAR is Interfaces.C.Strings.chars_ptr;
subtype PVOID is System.Address; subtype PVOID is System.Address;
Null_Void : constant PVOID := System.Null_Address;
Null_Void : constant PVOID := System.Null_Address;
type PLONG is access all Interfaces.C.long; type PLONG is access all Interfaces.C.long;
type PDWORD is access all DWORD; type PDWORD is access all DWORD;
...@@ -185,6 +187,9 @@ pragma Preelaborate; ...@@ -185,6 +187,9 @@ pragma Preelaborate;
type Thread_Body is access type Thread_Body is access
function (arg : System.Address) return System.Address; function (arg : System.Address) return System.Address;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
procedure SwitchToThread; procedure SwitchToThread;
pragma Import (Stdcall, SwitchToThread, "SwitchToThread"); pragma Import (Stdcall, SwitchToThread, "SwitchToThread");
...@@ -216,6 +221,9 @@ pragma Preelaborate; ...@@ -216,6 +221,9 @@ pragma Preelaborate;
(pThreadParameter : PVOID) return DWORD; (pThreadParameter : PVOID) return DWORD;
pragma Convention (Stdcall, PTHREAD_START_ROUTINE); pragma Convention (Stdcall, PTHREAD_START_ROUTINE);
function To_PTHREAD_START_ROUTINE is new
Unchecked_Conversion (System.Address, PTHREAD_START_ROUTINE);
type SECURITY_ATTRIBUTES is record type SECURITY_ATTRIBUTES is record
nLength : DWORD; nLength : DWORD;
pSecurityDescriptor : PVOID; pSecurityDescriptor : PVOID;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,19 +32,13 @@ ...@@ -31,19 +32,13 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This is the VxWorks version of this package. -- This is the VxWorks version of this package
--
-- VxWorks does not directly support the needed POSIX routines, but it
-- does have other routines that make it possible to code equivalent
-- POSIX compliant routines. The approach taken is to provide an
-- FSU threads compliant interface.
-- This package encapsulates all direct interfaces to OS services -- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System. -- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- or remove the pragma Elaborate_Body. -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C; with Interfaces.C;
with System.VxWorks; with System.VxWorks;
......
2004-02-25 Robert Dewar <dewar@gnat.com>
* 51osinte.ads, 52osinte.ads, 53osinte.ads, 54osinte.ads,
55osinte.ads, 56osinte.ads, 5aosinte.ads, 5bosinte.ads,
5cosinte.ads, 5fosinte.ads, 5gosinte.ads, 5hosinte.ads,
5iosinte.ads, 5losinte.ads, 5nosinte.ads, 5oosinte.ads,
5posinte.ads, 5sosinte.ads, 5tosinte.ads, 5vosinte.ads,
5wosinte.ads, 5zosinte.ads: Move instances of Unchecked_Conversion to
the defining instance of the type to avoid aliasing problems.
Fix copyright header. Fix bad comments in package header.
* exp_util.adb, prj-part.adb, prj-part.adb: Minor reformatting
2004-02-25 Ed Schonberg <schonberg@gnat.com>
* exp_ch2.adb (Param_Entity): Handle properly formals that have been
rewritten as references when aliased through an address clause.
* sem_ch4.adb (Try_Indirect_Call): Normalize actuals before checking
whether call can be interpreted as an indirect call to the result of a
parameterless function call returning an access subprogram.
2004-02-25 Arnaud Charlet <charlet@act-europe.fr>
Code clean up:
* exp_ch7.adb (Make_Clean): Remove generation of calls to
Unlock[_Entries], since this is now done by Service_Entries directly.
* exp_ch9.adb (Build_Protected_Subprogram_Body): ditto.
* s-tpobop.ads, s-tpobop.adb (PO_Service_Entries): New nested procedure
Requeue_Call for better code readability. Change spec and update calls:
PO_Service_Entries now unlock the PO on exit.
(Protected_Entry_Call, Timed_Protected_Entry_Call): Update calls to
PO_Service_Entries.
* s-tposen.ads, s-tposen.adb (Service_Entry): Now unlock the PO on exit.
* s-taenca.adb, s-tasren.adb: Update calls to PO_Service_Entries.
2004-02-25 Sergey Rybin <rybin@act-europe.fr>
* exp_ch9.adb (Build_Simple_Entry_Call): Prevent expanding the
protected subprogram call and analyzing the result of such expanding
in case when the called protected subprogram is eliminated.
* sem_elim.adb (Check_Eliminated): Skip blocks when comparing scope
names.
2004-02-25 Jerome Guitton <guitton@act-europe.fr>
* Makefile.in: Clean ups.
2004-02-23 Ed Schonberg <schonberg@gnat.com> 2004-02-23 Ed Schonberg <schonberg@gnat.com>
* exp_ch6.adb (Expand_N_Subprogram_Declaration): Do not create * exp_ch6.adb (Expand_N_Subprogram_Declaration): Do not create
......
...@@ -1382,6 +1382,7 @@ HIE_OBJS = \ ...@@ -1382,6 +1382,7 @@ HIE_OBJS = \
s-fatflt.o \ s-fatflt.o \
s-fatlfl.o \ s-fatlfl.o \
s-fatllf.o \ s-fatllf.o \
s-fatsfl.o \
s-secsta.o \ s-secsta.o \
a-tags.o $(EXTRA_HIE_OBJS) a-tags.o $(EXTRA_HIE_OBJS)
...@@ -1428,8 +1429,7 @@ RAVEN_SOURCES = $(NON_COMPILABLE_RAVEN_SOURCES) $(COMPILABLE_RAVEN_SOURCES) ...@@ -1428,8 +1429,7 @@ RAVEN_SOURCES = $(NON_COMPILABLE_RAVEN_SOURCES) $(COMPILABLE_RAVEN_SOURCES)
# Objects to generate for the ravenscar run time # Objects to generate for the ravenscar run time
RAVEN_OBJS = \ RAVEN_LIBGNARL_OBJS = \
$(HIE_OBJS) \
s-parame.o \ s-parame.o \
s-purexc.o \ s-purexc.o \
s-osinte.o \ s-osinte.o \
...@@ -1442,6 +1442,7 @@ RAVEN_OBJS = \ ...@@ -1442,6 +1442,7 @@ RAVEN_OBJS = \
a-intnam.o \ a-intnam.o \
a-reatim.o \ a-reatim.o \
a-retide.o \ a-retide.o \
s-osinte.o \
s-taprob.o \ s-taprob.o \
s-tposen.o \ s-tposen.o \
s-tasres.o \ s-tasres.o \
...@@ -1449,6 +1450,10 @@ RAVEN_OBJS = \ ...@@ -1449,6 +1450,10 @@ RAVEN_OBJS = \
a-sytaco.o \ a-sytaco.o \
a-taside.o $(EXTRA_RAVEN_OBJS) a-taside.o $(EXTRA_RAVEN_OBJS)
RAVEN_OBJS = \
$(HIE_OBJS) \
$(RAVEN_LIBGNARL_OBJS)
# Default run time files # Default run time files
ADA_INCLUDE_SRCS =\ ADA_INCLUDE_SRCS =\
...@@ -1874,10 +1879,13 @@ rts-ravenscar: force ...@@ -1874,10 +1879,13 @@ rts-ravenscar: force
COMPILABLE_SOURCES="$(COMPILABLE_RAVEN_SOURCES)" COMPILABLE_SOURCES="$(COMPILABLE_RAVEN_SOURCES)"
$(GNATMAKE) -Prts-ravenscar/ravenscar.gpr \ $(GNATMAKE) -Prts-ravenscar/ravenscar.gpr \
--GCC="../../../xgcc -B../../../" --GCC="../../../xgcc -B../../../"
cd rts-ravenscar/adalib/ ; $(AR) r libgnat.a *.o cd rts-ravenscar/adalib ; \
$(foreach FILE,$(RAVEN_LIBGNARL_OBJS), $(AR) r libgnarl.a $(FILE);) \
$(foreach FILE,$(HIE_OBJS), $(AR) r libgnat.a $(FILE);)
$(RM) rts-ravenscar/adalib/*.o $(RM) rts-ravenscar/adalib/*.o
$(CHMOD) a-wx rts-ravenscar/adalib/*.ali $(CHMOD) a-wx rts-ravenscar/adalib/*.ali
$(CHMOD) a-wx rts-ravenscar/adalib/libgnat.a $(CHMOD) a-wx rts-ravenscar/adalib/libgnat.a
$(CHMOD) a-wx rts-ravenscar/adalib/libgnarl.a
# Warning: this target assumes that LIBRARY_VERSION has been set correctly. # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
gnatlib-shared-default: gnatlib-shared-default:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -695,6 +695,8 @@ package body Exp_Ch2 is ...@@ -695,6 +695,8 @@ package body Exp_Ch2 is
-- where rec is a selector whose Entry_Formal link points to the formal -- where rec is a selector whose Entry_Formal link points to the formal
-- For a formal of a task entity, the formal is rewritten as a local -- For a formal of a task entity, the formal is rewritten as a local
-- renaming. -- renaming.
-- In addition, a formal that is marked volatile because it is aliased
-- through an address clause is rewritten as dereference as well.
function Param_Entity (N : Node_Id) return Entity_Id is function Param_Entity (N : Node_Id) return Entity_Id is
begin begin
...@@ -723,6 +725,9 @@ package body Exp_Ch2 is ...@@ -723,6 +725,9 @@ package body Exp_Ch2 is
if Present (Entry_Formal (Entity (S))) then if Present (Entry_Formal (Entity (S))) then
return Entry_Formal (Entity (S)); return Entry_Formal (Entity (S));
end if; end if;
elsif Nkind (Original_Node (N)) = N_Identifier then
return Param_Entity (Original_Node (N));
end if; end if;
end; end;
end if; end if;
......
...@@ -2193,7 +2193,6 @@ package body Exp_Ch7 is ...@@ -2193,7 +2193,6 @@ package body Exp_Ch7 is
Spec : Node_Id; Spec : Node_Id;
Name : Node_Id; Name : Node_Id;
Param : Node_Id; Param : Node_Id;
Unlock : Node_Id;
Param_Type : Entity_Id; Param_Type : Entity_Id;
Pid : Entity_Id := Empty; Pid : Entity_Id := Empty;
Cancel_Param : Entity_Id; Cancel_Param : Entity_Id;
...@@ -2274,50 +2273,53 @@ package body Exp_Ch7 is ...@@ -2274,50 +2273,53 @@ package body Exp_Ch7 is
Selector_Name => Selector_Name =>
Make_Identifier (Loc, Name_uObject)), Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access)))); Attribute_Name => Name_Unchecked_Access))));
end if;
-- Unlock (_object._object'Access); else
-- Unlock (_object._object'Access);
-- _object is the record used to implement the protected object. -- object is the record used to implement the protected object.
-- It is a parameter to the protected subprogram. -- It is a parameter to the protected subprogram.
-- If the protected object is controlled (i.e it has entries or -- If the protected object is controlled (i.e it has entries or
-- needs finalization for interrupt handling), call Unlock_Entries, -- needs finalization for interrupt handling), call
-- except if the protected object follows the ravenscar profile, in -- Unlock_Entries, except if the protected object follows the
-- which case call Unlock_Entry, otherwise call the simplified -- ravenscar profile, in which case call Unlock_Entry, otherwise
-- version, Unlock. -- call the simplified version, Unlock.
if Has_Entries (Pid) if Has_Entries (Pid)
or else Has_Interrupt_Handler (Pid) or else Has_Interrupt_Handler (Pid)
or else (Has_Attach_Handler (Pid) and then not Restricted_Profile) or else (Has_Attach_Handler (Pid)
then and then not Restricted_Profile)
if Abort_Allowed
or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Pid) > 1
then then
Unlock := New_Reference_To (RTE (RE_Unlock_Entries), Loc); if Abort_Allowed
or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Pid) > 1
then
Name := New_Reference_To (RTE (RE_Unlock_Entries), Loc);
else
Name := New_Reference_To (RTE (RE_Unlock_Entry), Loc);
end if;
else else
Unlock := New_Reference_To (RTE (RE_Unlock_Entry), Loc); Name := New_Reference_To (RTE (RE_Unlock), Loc);
end if; end if;
else Append_To (Stmt,
Unlock := New_Reference_To (RTE (RE_Unlock), Loc); Make_Procedure_Call_Statement (Loc,
Name => Name,
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
New_Reference_To (Defining_Identifier (Param), Loc),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access))));
end if; end if;
Append_To (Stmt,
Make_Procedure_Call_Statement (Loc,
Name => Unlock,
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
New_Reference_To (Defining_Identifier (Param), Loc),
Selector_Name =>
Make_Identifier (Loc, Name_uObject)),
Attribute_Name => Name_Unchecked_Access))));
if Abort_Allowed then if Abort_Allowed then
-- Abort_Undefer; -- Abort_Undefer;
Append_To (Stmt, Append_To (Stmt,
......
...@@ -1553,10 +1553,7 @@ package body Exp_Ch9 is ...@@ -1553,10 +1553,7 @@ package body Exp_Ch9 is
Sub_Body : Node_Id; Sub_Body : Node_Id;
Lock_Name : Node_Id; Lock_Name : Node_Id;
Lock_Stmt : Node_Id; Lock_Stmt : Node_Id;
Unlock_Name : Node_Id;
Unlock_Stmt : Node_Id;
Service_Name : Node_Id; Service_Name : Node_Id;
Service_Stmt : Node_Id;
R : Node_Id; R : Node_Id;
Return_Stmt : Node_Id := Empty; -- init to avoid gcc 3 warning Return_Stmt : Node_Id := Empty; -- init to avoid gcc 3 warning
Pre_Stmts : List_Id := No_List; -- init to avoid gcc 3 warning Pre_Stmts : List_Id := No_List; -- init to avoid gcc 3 warning
...@@ -1740,19 +1737,16 @@ package body Exp_Ch9 is ...@@ -1740,19 +1737,16 @@ package body Exp_Ch9 is
or else Number_Entries (Pid) > 1 or else Number_Entries (Pid) > 1
then then
Lock_Name := New_Reference_To (RTE (RE_Lock_Entries), Loc); Lock_Name := New_Reference_To (RTE (RE_Lock_Entries), Loc);
Unlock_Name := New_Reference_To (RTE (RE_Unlock_Entries), Loc);
Service_Name := New_Reference_To (RTE (RE_Service_Entries), Loc); Service_Name := New_Reference_To (RTE (RE_Service_Entries), Loc);
else else
Lock_Name := New_Reference_To (RTE (RE_Lock_Entry), Loc); Lock_Name := New_Reference_To (RTE (RE_Lock_Entry), Loc);
Unlock_Name := New_Reference_To (RTE (RE_Unlock_Entry), Loc);
Service_Name := New_Reference_To (RTE (RE_Service_Entry), Loc); Service_Name := New_Reference_To (RTE (RE_Service_Entry), Loc);
end if; end if;
else else
Lock_Name := New_Reference_To (RTE (RE_Lock), Loc); Lock_Name := New_Reference_To (RTE (RE_Lock), Loc);
Unlock_Name := New_Reference_To (RTE (RE_Unlock), Loc); Service_Name := New_Reference_To (RTE (RE_Unlock), Loc);
Service_Name := Empty;
end if; end if;
Object_Parm := Object_Parm :=
...@@ -1790,20 +1784,12 @@ package body Exp_Ch9 is ...@@ -1790,20 +1784,12 @@ package body Exp_Ch9 is
Append (Unprot_Call, Stmts); Append (Unprot_Call, Stmts);
end if; end if;
if Service_Name /= Empty then Append (
Service_Stmt := Make_Procedure_Call_Statement (Loc,
Name => Service_Name,
Parameter_Associations =>
New_List (New_Copy_Tree (Object_Parm)));
Append (Service_Stmt, Stmts);
end if;
Unlock_Stmt :=
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => Unlock_Name, Name => Service_Name,
Parameter_Associations => New_List ( Parameter_Associations =>
New_Copy_Tree (Object_Parm))); New_List (New_Copy_Tree (Object_Parm))),
Append (Unlock_Stmt, Stmts); Stmts);
if Abort_Allowed then if Abort_Allowed then
Append ( Append (
...@@ -2040,9 +2026,12 @@ package body Exp_Ch9 is ...@@ -2040,9 +2026,12 @@ package body Exp_Ch9 is
if Is_Protected_Type (Conctyp) if Is_Protected_Type (Conctyp)
and then Is_Subprogram (Entity (Ename)) and then Is_Subprogram (Entity (Ename))
then then
Build_Protected_Subprogram_Call if not Is_Eliminated (Entity (Ename)) then
(N, Ename, Convert_Concurrent (Concval, Conctyp)); Build_Protected_Subprogram_Call
Analyze (N); (N, Ename, Convert_Concurrent (Concval, Conctyp));
Analyze (N);
end if;
return; return;
end if; end if;
......
...@@ -3264,8 +3264,7 @@ package body Exp_Util is ...@@ -3264,8 +3264,7 @@ package body Exp_Util is
N_In | N_In |
N_Not_In | N_Not_In |
N_And_Then | N_And_Then |
N_Or_Else N_Or_Else =>
=>
return Side_Effect_Free (Left_Opnd (N)) return Side_Effect_Free (Left_Opnd (N))
and then Side_Effect_Free (Right_Opnd (N)); and then Side_Effect_Free (Right_Opnd (N));
......
...@@ -100,7 +100,7 @@ package body Prj.Part is ...@@ -100,7 +100,7 @@ package body Prj.Part is
type Names_And_Id is record type Names_And_Id is record
Path_Name : Name_Id; Path_Name : Name_Id;
Canonical_Path_Name : Name_Id; Canonical_Path_Name : Name_Id;
Id : Project_Node_Id; Id : Project_Node_Id;
end record; end record;
package Project_Stack is new Table.Table package Project_Stack is new Table.Table
...@@ -763,10 +763,10 @@ package body Prj.Part is ...@@ -763,10 +763,10 @@ package body Prj.Part is
for Index in 1 .. Project_Stack.Last loop for Index in 1 .. Project_Stack.Last loop
if Project_Stack.Table (Index).Canonical_Path_Name = if Project_Stack.Table (Index).Canonical_Path_Name =
Canonical_Path_Name Canonical_Path_Name
then then
-- We have found the limited imported project, -- We have found the limited imported project,
-- get its project id, and don't parse it. -- get its project id, and do not parse it.
Withed_Project := Project_Stack.Table (Index).Id; Withed_Project := Project_Stack.Table (Index).Id;
exit; exit;
...@@ -915,6 +915,7 @@ package body Prj.Part is ...@@ -915,6 +915,7 @@ package body Prj.Part is
loop loop
declare declare
Path_Id : Name_Id := Path_Name_Of (A_Project_Name_And_Node.Node); Path_Id : Name_Id := Path_Name_Of (A_Project_Name_And_Node.Node);
begin begin
if Path_Id /= No_Name then if Path_Id /= No_Name then
Get_Name_String (Path_Id); Get_Name_String (Path_Id);
...@@ -947,10 +948,12 @@ package body Prj.Part is ...@@ -947,10 +948,12 @@ package body Prj.Part is
if From_Extended /= None then if From_Extended /= None then
declare declare
Decl : Project_Node_Id := Decl : Project_Node_Id :=
Project_Declaration_Of Project_Declaration_Of
(A_Project_Name_And_Node.Node); (A_Project_Name_And_Node.Node);
Prj : Project_Node_Id := Prj : Project_Node_Id :=
Extending_Project_Of (Decl); Extending_Project_Of (Decl);
begin begin
loop loop
Decl := Project_Declaration_Of (Prj); Decl := Project_Declaration_Of (Prj);
...@@ -983,7 +986,7 @@ package body Prj.Part is ...@@ -983,7 +986,7 @@ package body Prj.Part is
Source_Index := Load_Project_File (Path_Name); Source_Index := Load_Project_File (Path_Name);
Tree.Save (Project_Comment_State); Tree.Save (Project_Comment_State);
-- if we cannot find it, we stop -- If we cannot find it, we stop
if Source_Index = No_Source_File then if Source_Index = No_Source_File then
Project := Empty_Node; Project := Empty_Node;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2003, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -470,7 +470,7 @@ package body System.Tasking.Entry_Calls is ...@@ -470,7 +470,7 @@ package body System.Tasking.Entry_Calls is
STPO.Unlock (Entry_Call.Called_Task); STPO.Unlock (Entry_Call.Called_Task);
else else
Called_PO := To_Protection (Entry_Call.Called_PO); Called_PO := To_Protection (Entry_Call.Called_PO);
PO_Service_Entries (Self_ID, Called_PO); PO_Service_Entries (Self_ID, Called_PO, False);
if Called_PO.Pending_Action then if Called_PO.Pending_Action then
Called_PO.Pending_Action := False; Called_PO.Pending_Action := False;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2003, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -71,7 +71,6 @@ with System.Tasking.Protected_Objects.Operations; ...@@ -71,7 +71,6 @@ with System.Tasking.Protected_Objects.Operations;
-- used for PO_Do_Or_Queue -- used for PO_Do_Or_Queue
-- PO_Service_Entries -- PO_Service_Entries
-- Lock_Entries -- Lock_Entries
-- Unlock_Entries
with System.Tasking.Debug; with System.Tasking.Debug;
-- used for Trace -- used for Trace
...@@ -678,7 +677,6 @@ package body System.Tasking.Rendezvous is ...@@ -678,7 +677,6 @@ package body System.Tasking.Rendezvous is
(Self_Id, Called_PO, Entry_Call, (Self_Id, Called_PO, Entry_Call,
Entry_Call.Requeue_With_Abort); Entry_Call.Requeue_With_Abort);
POO.PO_Service_Entries (Self_Id, Called_PO); POO.PO_Service_Entries (Self_Id, Called_PO);
STPE.Unlock_Entries (Called_PO);
end if; end if;
end if; end if;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -95,19 +95,22 @@ package System.Tasking.Protected_Objects.Operations is ...@@ -95,19 +95,22 @@ package System.Tasking.Protected_Objects.Operations is
pragma Inline (Service_Entries); pragma Inline (Service_Entries);
procedure PO_Service_Entries procedure PO_Service_Entries
(Self_ID : Task_ID; (Self_ID : Task_ID;
Object : Entries.Protection_Entries_Access); Object : Entries.Protection_Entries_Access;
Unlock_Object : Boolean := True);
-- Service all entry queues of the specified object, executing the -- Service all entry queues of the specified object, executing the
-- corresponding bodies of any queued entry calls that are waiting -- corresponding bodies of any queued entry calls that are waiting
-- on True barriers. This is used when the state of a protected -- on True barriers. This is used when the state of a protected
-- object may have changed, in particular after the execution of -- object may have changed, in particular after the execution of
-- the statement sequence of a protected procedure. -- the statement sequence of a protected procedure.
--
-- Note that servicing an entry may change the value of one or more -- Note that servicing an entry may change the value of one or more
-- barriers, so this routine keeps checking barriers until all of -- barriers, so this routine keeps checking barriers until all of
-- them are closed. -- them are closed.
-- --
-- This must be called with abortion deferred and with the corresponding -- This must be called with abortion deferred and with the corresponding
-- object locked. -- object locked.
-- If Unlock_Object, then Object is unlocked on return.
procedure Complete_Entry_Body (Object : Entries.Protection_Entries_Access); procedure Complete_Entry_Body (Object : Entries.Protection_Entries_Access);
-- Called from within an entry body procedure, indicates that the -- Called from within an entry body procedure, indicates that the
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1998-2002, Free Software Foundation, Inc. -- -- Copyright (C) 1998-2004, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -52,7 +52,7 @@ pragma Style_Checks (All_Checks); ...@@ -52,7 +52,7 @@ pragma Style_Checks (All_Checks);
-- mentioned above are respected, except for the No_Entry_Queue restriction -- mentioned above are respected, except for the No_Entry_Queue restriction
-- that is checked dynamically in this package, since the check cannot be -- that is checked dynamically in this package, since the check cannot be
-- performed at compile time, and is relatively cheap (see PO_Do_Or_Queue, -- performed at compile time, and is relatively cheap (see PO_Do_Or_Queue,
-- PO_Service_Entry). -- Service_Entry).
pragma Polling (Off); pragma Polling (Off);
-- Turn off polling, we do not want polling to take place during tasking -- Turn off polling, we do not want polling to take place during tasking
...@@ -530,6 +530,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is ...@@ -530,6 +530,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is
-- Program_Error to the caller. -- Program_Error to the caller.
Send_Program_Error (Self_Id, Entry_Call); Send_Program_Error (Self_Id, Entry_Call);
Unlock_Entry (Object);
return; return;
end if; end if;
...@@ -538,6 +539,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is ...@@ -538,6 +539,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is
(Object.Compiler_Info, Entry_Call.Uninterpreted_Data, 1); (Object.Compiler_Info, Entry_Call.Uninterpreted_Data, 1);
Object.Call_In_Progress := null; Object.Call_In_Progress := null;
Caller := Entry_Call.Self; Caller := Entry_Call.Self;
Unlock_Entry (Object);
if Single_Lock then if Single_Lock then
STPO.Lock_RTS; STPO.Lock_RTS;
...@@ -556,6 +558,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is ...@@ -556,6 +558,7 @@ package body System.Tasking.Protected_Objects.Single_Entry is
exception exception
when others => when others =>
Send_Program_Error (Self_Id, Entry_Call); Send_Program_Error (Self_Id, Entry_Call);
Unlock_Entry (Object);
end Service_Entry; end Service_Entry;
--------------------------------------- ---------------------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- -- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -222,8 +222,9 @@ package System.Tasking.Protected_Objects.Single_Entry is ...@@ -222,8 +222,9 @@ package System.Tasking.Protected_Objects.Single_Entry is
-- barrier. This is used when the state of a protected object may have -- barrier. This is used when the state of a protected object may have
-- changed, in particular after the execution of the statement sequence of -- changed, in particular after the execution of the statement sequence of
-- a protected procedure. -- a protected procedure.
-- This must be called with abortion deferred and with the corresponding --
-- object locked. -- This must be called with abort deferred and with the corresponding
-- object locked. Object is unlocked on return.
procedure Protected_Single_Entry_Call procedure Protected_Single_Entry_Call
(Object : Protection_Entry_Access; (Object : Protection_Entry_Access;
......
...@@ -4317,13 +4317,15 @@ package body Sem_Ch4 is ...@@ -4317,13 +4317,15 @@ package body Sem_Ch4 is
Nam : Entity_Id; Nam : Entity_Id;
Typ : Entity_Id) return Boolean Typ : Entity_Id) return Boolean
is is
Actuals : constant List_Id := Parameter_Associations (N);
Actual : Node_Id; Actual : Node_Id;
Formal : Entity_Id; Formal : Entity_Id;
Call_OK : Boolean;
begin begin
Actual := First (Actuals); Normalize_Actuals (N, Designated_Type (Typ), False, Call_OK);
Actual := First_Actual (N);
Formal := First_Formal (Designated_Type (Typ)); Formal := First_Formal (Designated_Type (Typ));
while Present (Actual) while Present (Actual)
and then Present (Formal) and then Present (Formal)
loop loop
......
...@@ -289,8 +289,15 @@ package body Sem_Elim is ...@@ -289,8 +289,15 @@ package body Sem_Elim is
-- Then we need to see if the static scope matches within the -- Then we need to see if the static scope matches within the
-- compilation unit. -- compilation unit.
-- At the moment, gnatelim does not consider block statements as
-- scopes (even if a block is named)
Scop := Scope (E); Scop := Scope (E);
while Ekind (Scop) = E_Block loop
Scop := Scope (Scop);
end loop;
if Elmt.Entity_Scope /= null then if Elmt.Entity_Scope /= null then
for J in reverse Elmt.Entity_Scope'Range loop for J in reverse Elmt.Entity_Scope'Range loop
if Elmt.Entity_Scope (J) /= Original_Chars (Scop) then if Elmt.Entity_Scope (J) /= Original_Chars (Scop) then
...@@ -299,6 +306,10 @@ package body Sem_Elim is ...@@ -299,6 +306,10 @@ package body Sem_Elim is
Scop := Scope (Scop); Scop := Scope (Scop);
while Ekind (Scop) = E_Block loop
Scop := Scope (Scop);
end loop;
if not Is_Compilation_Unit (Scop) and then J = 1 then if not Is_Compilation_Unit (Scop) and then J = 1 then
goto Continue; goto Continue;
end if; end if;
...@@ -314,6 +325,10 @@ package body Sem_Elim is ...@@ -314,6 +325,10 @@ package body Sem_Elim is
Scop := Scope (Scop); Scop := Scope (Scop);
while Ekind (Scop) = E_Block loop
Scop := Scope (Scop);
end loop;
if Scop /= Standard_Standard and then J = 1 then if Scop /= Standard_Standard and then J = 1 then
goto Continue; goto Continue;
end if; end if;
......
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