[multiple changes]

2011-11-07  Olivier Hainque  <hainque@adacore.com>

	* sigtramp-ppcvxw.c: Add general comments.
	(CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
	rules for r2 to r13, plus CTR and XER.
	(CFA_REG): New, register number used to hold the local CFA.
	(CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
	Make that 15, not 14, with documentation.
	(TCR): Undef before definition, preventing conflict with reg number in
	VxWorks headers.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
	aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
	* gcc-interface/Make-lang.in: Update dependencies. 

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb: A tagged type is a legal actual for an aliased
	formal.

2011-11-07  Pascal Obry  <obry@adacore.com>

	* g-socket.adb, g-socket.ads: Minor reformatting.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Resolve_Actuals): Minor error message improvement.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Add discussion of default mode handling of
	source representation with no -gnatW option given, in particular
	noting that NEL (next line) is not recognized in this context.

From-SVN: r181094
This commit is contained in:
Arnaud Charlet 2011-11-07 17:30:55 +01:00
parent 9ee76313c4
commit b5bf33351a
17 changed files with 205 additions and 120 deletions

View File

@ -1,3 +1,39 @@
2011-11-07 Olivier Hainque <hainque@adacore.com>
* sigtramp-ppcvxw.c: Add general comments.
(CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
rules for r2 to r13, plus CTR and XER.
(CFA_REG): New, register number used to hold the local CFA.
(CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
Make that 15, not 14, with documentation.
(TCR): Undef before definition, preventing conflict with reg number in
VxWorks headers.
2011-11-07 Robert Dewar <dewar@adacore.com>
* exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
* gcc-interface/Make-lang.in: Update dependencies.
2011-11-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb: A tagged type is a legal actual for an aliased
formal.
2011-11-07 Pascal Obry <obry@adacore.com>
* g-socket.adb, g-socket.ads: Minor reformatting.
2011-11-07 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Actuals): Minor error message improvement.
2011-11-07 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Add discussion of default mode handling of
source representation with no -gnatW option given, in particular
noting that NEL (next line) is not recognized in this context.
2011-11-07 Yannick Moy <moy@adacore.com>
* sem_util.adb (Note_Possible_Modification): In Alfa mode,

View File

@ -846,8 +846,8 @@ package body Ada.Containers.Hashed_Maps is
---------------
function Constant_Reference
(Container : aliased Map; Position : Cursor)
return Constant_Reference_Type
(Container : aliased Map;
Position : Cursor) return Constant_Reference_Type
is
pragma Unreferenced (Container);
begin
@ -855,8 +855,8 @@ package body Ada.Containers.Hashed_Maps is
end Constant_Reference;
function Reference
(Container : aliased in out Map; Position : Cursor)
return Reference_Type
(Container : aliased in out Map;
Position : Cursor) return Reference_Type
is
pragma Unreferenced (Container);
begin
@ -864,16 +864,16 @@ package body Ada.Containers.Hashed_Maps is
end Reference;
function Constant_Reference
(Container : aliased Map; Key : Key_Type)
return Constant_Reference_Type
(Container : aliased Map;
Key : Key_Type) return Constant_Reference_Type
is
begin
return (Element => Container.Element (Key)'Unrestricted_Access);
end Constant_Reference;
function Reference
(Container : aliased in out Map; Key : Key_Type)
return Reference_Type
(Container : aliased in out Map;
Key : Key_Type) return Reference_Type
is
begin
return (Element => Container.Element (Key)'Unrestricted_Access);

View File

@ -311,28 +311,28 @@ package Ada.Containers.Hashed_Maps is
for Reference_Type'Read use Read;
function Constant_Reference
(Container : aliased Map; Position : Cursor)
return Constant_Reference_Type;
(Container : aliased Map;
Position : Cursor) return Constant_Reference_Type;
function Reference
(Container : aliased in out Map; Position : Cursor)
return Reference_Type;
(Container : aliased in out Map;
Position : Cursor) return Reference_Type;
function Constant_Reference
(Container : aliased Map; Key : Key_Type)
return Constant_Reference_Type;
(Container : aliased Map;
Key : Key_Type) return Constant_Reference_Type;
function Reference
(Container : aliased in out Map; Key : Key_Type)
return Reference_Type;
(Container : aliased in out Map;
Key : Key_Type) return Reference_Type;
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
-- Calls Process for each node in the map
function Iterate (Container : Map)
return Map_Iterator_Interfaces.Forward_Iterator'class;
function Iterate
(Container : Map) return Map_Iterator_Interfaces.Forward_Iterator'class;
private
pragma Inline ("=");

View File

@ -180,13 +180,13 @@ package Aspects is
-- to the class-wide type as well.
Inherited_Aspect : constant array (Aspect_Id) of Boolean :=
(Aspect_Constant_Indexing => True,
Aspect_Default_Iterator => True,
Aspect_Implicit_Dereference => True,
Aspect_Iterator_Element => True,
Aspect_Remote_Types => True,
Aspect_Variable_Indexing => True,
others => False);
(Aspect_Constant_Indexing => True,
Aspect_Default_Iterator => True,
Aspect_Implicit_Dereference => True,
Aspect_Iterator_Element => True,
Aspect_Remote_Types => True,
Aspect_Variable_Indexing => True,
others => False);
-- The following subtype defines aspects corresponding to library unit
-- pragmas, these can only validly appear as aspects for library units,

View File

@ -151,16 +151,16 @@ package Atree is
-- it is useful to be able to do untyped traversals, and an internal
-- package in Atree allows for direct untyped accesses in such cases.
-- Flag4 Sixteen Boolean flags (use depends on Nkind and
-- Flag4 Fifteen Boolean flags (use depends on Nkind and
-- Flag5 Ekind, as described for FieldN). Again the access
-- Flag6 is usually via subprograms in Sinfo and Einfo which
-- Flag7 provide high-level synonyms for these flags, and
-- Flag8 contain debugging code that checks that the values
-- Flag9 in Nkind and Ekind are appropriate for the access.
-- Flag10
-- Flag11 Note that Flag1-2 are missing from this list. For
-- Flag11 Note that Flag1-3 are missing from this list. For
-- Flag12 historical reasons, these flag names are unused.
-- Flag13 What about Flag3???
-- Flag13
-- Flag14
-- Flag15
-- Flag16

View File

@ -297,13 +297,10 @@ package body Exp_Alfa is
T : constant Entity_Id := Etype (N);
begin
-- Substitute a reference to a renaming with the actual renamed object
-- Replace a reference to a renaming with the actual renamed object
if Ekind (E) in Object_Kind
and then Present (Renamed_Object (E))
then
if Ekind (E) in Object_Kind and then Present (Renamed_Object (E)) then
Rewrite (N, New_Copy_Tree (Renamed_Object (E)));
Reset_Analyzed_Flags (N);
Analyze_And_Resolve (N, T);
end if;

View File

@ -2652,10 +2652,13 @@ package body Exp_Ch6 is
end if;
end if;
-- For Ada 2012, if a parameter is aliased, the actual must be an
-- aliased object.
-- For Ada 2012, if a parameter is aliased, the actual must be a
-- tagged type or an aliased view of an object.
if Is_Aliased (Formal) and then not Is_Aliased_View (Actual) then
if Is_Aliased (Formal)
and then not Is_Aliased_View (Actual)
and then not Is_Tagged_Type (Etype (Formal))
then
Error_Msg_NE
("actual for aliased formal& must be aliased object",
Actual, Formal);

View File

@ -50,7 +50,6 @@ package body Exp_Ch8 is
procedure Expand_N_Exception_Renaming_Declaration (N : Node_Id) is
Decl : constant Node_Id := Debug_Renaming_Declaration (N);
begin
if Present (Decl) then
Insert_Action (N, Decl);

View File

@ -32,5 +32,4 @@ package Exp_Ch8 is
procedure Expand_N_Object_Renaming_Declaration (N : Node_Id);
procedure Expand_N_Package_Renaming_Declaration (N : Node_Id);
procedure Expand_N_Subprogram_Renaming_Declaration (N : Node_Id);
end Exp_Ch8;

View File

@ -353,7 +353,8 @@ package Exp_Util is
procedure Evaluate_Name (Nam : Node_Id);
-- Remove the all side effects from a name which appears as part of an
-- object renaming declaration.
-- object renaming declaration. More comments are needed here that explain
-- how this differs from Force_Evaluation and Remove_Side_Effects ???
procedure Evolve_And_Then (Cond : in out Node_Id; Cond1 : Node_Id);
-- Rewrites Cond with the expression: Cond and then Cond1. If Cond is

View File

@ -36,8 +36,8 @@ with Ada.Unchecked_Conversion;
with Interfaces.C.Strings;
with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common;
with GNAT.Sockets.Thin; use GNAT.Sockets.Thin;
with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common;
with GNAT.Sockets.Thin; use GNAT.Sockets.Thin;
with GNAT.Sockets.Linker_Options;
pragma Warnings (Off, GNAT.Sockets.Linker_Options);
@ -246,11 +246,11 @@ package body GNAT.Sockets is
-- Type and Stream_Socket_Stream_Type.
procedure Wait_On_Socket
(Socket : Socket_Type;
For_Read : Boolean;
Timeout : Selector_Duration;
Selector : access Selector_Type := null;
Status : out Selector_Status);
(Socket : Socket_Type;
For_Read : Boolean;
Timeout : Selector_Duration;
Selector : access Selector_Type := null;
Status : out Selector_Status);
-- Common code for variants of socket operations supporting a timeout:
-- block in Check_Selector on Socket for at most the indicated timeout.
-- If For_Read is True, Socket is added to the read set for this call, else
@ -490,8 +490,8 @@ package body GNAT.Sockets is
-- that Fd is within range (otherwise behaviour is undefined).
elsif Fd < 0 or else Fd >= SOSC.FD_SETSIZE then
raise Constraint_Error with "invalid value for socket set: "
& Image (Fd);
raise Constraint_Error
with "invalid value for socket set: " & Image (Fd);
end if;
end Check_For_Fd_Set;
@ -731,11 +731,11 @@ package body GNAT.Sockets is
-- Wait for socket to become available for writing
Wait_On_Socket
(Socket => Socket,
For_Read => False,
Timeout => Timeout,
Selector => Selector,
Status => Status);
(Socket => Socket,
For_Read => False,
Timeout => Timeout,
Selector => Selector,
Status => Status);
-- Reset the socket to blocking I/O
@ -1580,11 +1580,11 @@ package body GNAT.Sockets is
--------------------
procedure Wait_On_Socket
(Socket : Socket_Type;
For_Read : Boolean;
Timeout : Selector_Duration;
Selector : access Selector_Type := null;
Status : out Selector_Status)
(Socket : Socket_Type;
For_Read : Boolean;
Timeout : Selector_Duration;
Selector : access Selector_Type := null;
Status : out Selector_Status)
is
type Local_Selector_Access is access Selector_Type;
for Local_Selector_Access'Storage_Size use Selector_Type'Size;

View File

@ -432,8 +432,8 @@ package GNAT.Sockets is
Immediate : constant Duration := 0.0;
Forever : constant Duration :=
Duration'Min (Duration'Last, 1.0 * SOSC.MAX_tv_sec);
Forever : constant Duration :=
Duration'Min (Duration'Last, 1.0 * SOSC.MAX_tv_sec);
-- Largest possible Duration that is also a valid value for struct timeval
subtype Timeval_Duration is Duration range Immediate .. Forever;
@ -1146,7 +1146,6 @@ private
R_Sig_Socket : Socket_Type := No_Socket;
W_Sig_Socket : Socket_Type := No_Socket;
-- Signalling sockets used to abort a select operation
end case;
end record;
@ -1234,10 +1233,10 @@ private
end record;
type Service_Entry_Type (Aliases_Length : Natural) is record
Official : Name_Type;
Aliases : Name_Array (1 .. Aliases_Length);
Port : Port_Type;
Protocol : Name_Type;
Official : Name_Type;
Aliases : Name_Array (1 .. Aliases_Length);
Port : Port_Type;
Protocol : Name_Type;
end record;
type Request_Flag_Type is mod 2 ** 8;

View File

@ -1773,7 +1773,7 @@ ada/exp_alfa.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \
ada/exp_alfa.ads ada/exp_alfa.adb ada/exp_attr.ads ada/exp_ch4.ads \
ada/exp_ch6.ads ada/exp_ch8.ads ada/exp_dbug.ads ada/exp_tss.ads \
ada/exp_ch6.ads ada/exp_dbug.ads ada/exp_tss.ads ada/exp_util.ads \
ada/gnat.ads ada/g-htable.ads ada/hostparm.ads ada/interfac.ads \
ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \
ada/opt.ads ada/output.ads ada/rtsfind.ads ada/sem_aux.ads \
@ -4070,42 +4070,42 @@ ada/sem_ch3.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/validsw.ads ada/warnsw.ads ada/widechar.ads
ada/sem_ch4.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/aspects.adb \
ada/atree.ads ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads \
ada/debug.ads ada/debug_a.ads ada/einfo.ads ada/einfo.adb \
ada/elists.ads ada/elists.adb ada/err_vars.ads ada/errout.ads \
ada/errout.adb ada/erroutc.ads ada/erroutc.adb ada/eval_fat.ads \
ada/exp_ch11.ads ada/exp_ch6.ads ada/exp_ch7.ads ada/exp_code.ads \
ada/exp_disp.ads ada/exp_tss.ads ada/exp_util.ads ada/expander.ads \
ada/fname.ads ada/fname-uf.ads ada/freeze.ads ada/get_targ.ads \
ada/gnat.ads ada/g-hesorg.ads ada/g-htable.ads ada/gnatvsn.ads \
ada/hlo.ads ada/hostparm.ads ada/inline.ads ada/interfac.ads \
ada/itypes.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \
ada/lib-load.ads ada/lib-sort.adb ada/lib-util.ads ada/lib-xref.ads \
ada/namet.ads ada/namet.adb ada/namet-sp.ads ada/nlists.ads \
ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \
ada/par_sco.ads ada/put_alfa.ads ada/restrict.ads ada/restrict.adb \
ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/sem.ads ada/sem.adb \
ada/sem_aggr.ads ada/sem_attr.ads ada/sem_aux.ads ada/sem_aux.adb \
ada/sem_case.ads ada/sem_case.adb ada/sem_cat.ads ada/sem_ch10.ads \
ada/sem_ch11.ads ada/sem_ch12.ads ada/sem_ch13.ads ada/sem_ch2.ads \
ada/sem_ch3.ads ada/sem_ch4.ads ada/sem_ch4.adb ada/sem_ch5.ads \
ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_ch9.ads \
ada/sem_disp.ads ada/sem_dist.ads ada/sem_elab.ads ada/sem_elim.ads \
ada/sem_eval.ads ada/sem_eval.adb ada/sem_intr.ads ada/sem_prag.ads \
ada/sem_res.ads ada/sem_res.adb ada/sem_type.ads ada/sem_util.ads \
ada/sem_util.adb ada/sem_warn.ads ada/sem_warn.adb ada/sinfo.ads \
ada/sinfo.adb ada/sinfo-cn.ads ada/sinput.ads ada/snames.ads \
ada/stand.ads ada/stringt.ads ada/stringt.adb ada/style.ads \
ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \
ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \
ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \
ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \
ada/debug_a.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \
ada/elists.adb ada/err_vars.ads ada/errout.ads ada/errout.adb \
ada/erroutc.ads ada/erroutc.adb ada/eval_fat.ads ada/exp_ch11.ads \
ada/exp_ch6.ads ada/exp_ch7.ads ada/exp_code.ads ada/exp_disp.ads \
ada/exp_tss.ads ada/exp_util.ads ada/expander.ads ada/fname.ads \
ada/fname-uf.ads ada/freeze.ads ada/get_targ.ads ada/gnat.ads \
ada/g-hesorg.ads ada/g-htable.ads ada/gnatvsn.ads ada/hlo.ads \
ada/hostparm.ads ada/inline.ads ada/interfac.ads ada/itypes.ads \
ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-load.ads \
ada/lib-sort.adb ada/lib-util.ads ada/lib-xref.ads ada/namet.ads \
ada/namet.adb ada/namet-sp.ads ada/nlists.ads ada/nlists.adb \
ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads ada/par_sco.ads \
ada/put_alfa.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \
ada/rtsfind.ads ada/scans.ads ada/sem.ads ada/sem.adb ada/sem_aggr.ads \
ada/sem_attr.ads ada/sem_aux.ads ada/sem_aux.adb ada/sem_case.ads \
ada/sem_case.adb ada/sem_cat.ads ada/sem_ch10.ads ada/sem_ch11.ads \
ada/sem_ch12.ads ada/sem_ch13.ads ada/sem_ch2.ads ada/sem_ch3.ads \
ada/sem_ch4.ads ada/sem_ch4.adb ada/sem_ch5.ads ada/sem_ch6.ads \
ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_ch9.ads ada/sem_disp.ads \
ada/sem_dist.ads ada/sem_elab.ads ada/sem_elim.ads ada/sem_eval.ads \
ada/sem_eval.adb ada/sem_intr.ads ada/sem_prag.ads ada/sem_res.ads \
ada/sem_res.adb ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \
ada/sem_warn.ads ada/sem_warn.adb ada/sinfo.ads ada/sinfo.adb \
ada/sinfo-cn.ads ada/sinput.ads ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/stringt.adb ada/style.ads ada/styleg.ads \
ada/styleg.adb ada/stylesw.ads ada/system.ads ada/s-exctab.ads \
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \
ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \
ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \
ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/sem_ch5.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \

View File

@ -7155,7 +7155,10 @@ used, it must be used consistently throughout the program. However,
since brackets encoding is always recognized, it may be conveniently
used in standard libraries, allowing these libraries to be used with
any of the available coding schemes.
scheme.
Note that brackets encoding only applies to program text. Within comments,
brackets are considered to be normal graphic characters, and bracket sequences
are never recognized as wide characters.
If no @option{-gnatW?} parameter is present, then the default
representation is normally Brackets encoding only. However, if the
@ -7169,6 +7172,27 @@ for Wide_Text_IO files if not specifically overridden by a WCEM form
parameter.
@end table
When no @option{-gnatW?} is specified, then characters (other than wide
characters represented using brackets notation) are treated as 8-bit
Latin-1 codes. The codes recognized are the Latin-1 graphic characters,
and ASCII format effectors (CR, LF, HT, VT). Other lower half control
characters in the range 16#00#..16#1F# are not accepted in program text
or in comments. Upper half control characters (16#80#..16#9F#) are rejected
in program text, but allowed and ignored in comments. Note in particular
that the Next Line (NEL) character whose encoding is 16#85# is not recognized
as an end of line in this default mode. If your source program contains
instances of the NEL character used as a line terminator,
you must use UTF-8 encoding for the whole
source program. In default mode, all lines must be ended by a standard
end of line sequence (CR, CR/LF, or LF).
Note that the convention of simply accepting all upper half characters in
comments means that programs that use standard ASCII for program text, but
UTF-8 encoding for comments are accepted in default mode, providing that the
comments are ended by an appropriate (CR, or CR/LF, or LF) line terminator.
This is a common mode for many programs with foreign language comments.
@node File Naming Control
@subsection File Naming Control

View File

@ -6507,7 +6507,6 @@ package body Sem_Ch4 is
-- Add implicit dereference interpretation
Disc := First_Discriminant (Etype (It.Nam));
while Present (Disc) loop
if Has_Implicit_Dereference (Disc) then
Add_One_Interp
@ -6517,6 +6516,7 @@ package body Sem_Ch4 is
Next_Discriminant (Disc);
end loop;
exit;
end if;
Get_Next_Interp (I, It);

View File

@ -3926,16 +3926,16 @@ package body Sem_Res is
if Is_Atomic_Object (A)
and then not Is_Atomic (Etype (F))
then
Error_Msg_N
("cannot pass atomic argument to non-atomic formal",
N);
Error_Msg_NE
("cannot pass atomic argument to non-atomic formal&",
A, F);
elsif Is_Volatile_Object (A)
and then not Is_Volatile (Etype (F))
then
Error_Msg_N
("cannot pass volatile argument to non-volatile formal",
N);
Error_Msg_NE
("cannot pass volatile argument to non-volatile formal&",
A, F);
end if;
end if;

View File

@ -55,7 +55,11 @@
Checking which variant should apply and getting at sc_pregs is simpler
to express in C (we can't use offsetof in toplevel asms and hardcoding
constants is not workable with the flurry of VxWorks variants), so this
is the choice for our toplevel interface. */
is the choice for our toplevel interface.
Note that the registers we "restore" here are those to which we have
direct access through the system sigcontext structure, which includes
only a partial set of the non-volatiles ABI-wise. */
/* -----------------------------------------
-- Protypes for our internal asm stubs --
@ -120,8 +124,9 @@ void __gnat_sigtramp (int signo, void *si, void *sc,
/* REGNO constants, dwarf column numbers for registers of interest. */
#define REGNO_LR 65
#define REGNO_XER 76
#define REGNO_CTR 66
#define REGNO_CR 70
#define REGNO_XER 76
#define REGNO_GR(N) (N)
#define REGNO_PC 67 /* ARG_POINTER_REGNUM */
@ -139,6 +144,8 @@ void __gnat_sigtramp (int signo, void *si, void *sc,
multine contents: */
#define TAB(S) "\t" S
#define CR(S) S "\n"
#undef TCR
#define TCR(S) TAB(CR(S))
/*------------------------------
@ -147,11 +154,18 @@ void __gnat_sigtramp (int signo, void *si, void *sc,
/* CFA setup block
---------------
Only non-volatile registers are suitable for a CFA base. We use r14
here and set it to the value we need in stub body that follows. */
Only non-volatile registers are suitable for a CFA base. These are the
only ones we can expect to be able retrieve from the unwinding context
while walking up the chain, saved by at least the bottom-most exception
propagation services. We use r15 here and set it to the value we need
in stub body that follows. Note that r14 is inappropriate here, even
though it is non-volatile according to the ABI, because GCC uses it as
an extra SCRATCH on SPE targets. */
#define CFA_REG 15
#define CFI_DEF_CFA \
CR(".cfi_def_cfa 14, 0")
CR(".cfi_def_cfa " S(CFA_REG) ", 0")
/* Register location blocks
------------------------
@ -164,7 +178,18 @@ CR(".cfi_def_cfa 14, 0")
#define CFI_COMMON_REGS \
CR("# CFI for common registers\n") \
TCR(COMMON_CFI(GR(1))) \
TCR(COMMON_CFI(GR(2))) \
TCR(COMMON_CFI(GR(3))) \
TCR(COMMON_CFI(GR(4))) \
TCR(COMMON_CFI(GR(5))) \
TCR(COMMON_CFI(GR(6))) \
TCR(COMMON_CFI(GR(7))) \
TCR(COMMON_CFI(GR(8))) \
TCR(COMMON_CFI(GR(9))) \
TCR(COMMON_CFI(GR(10))) \
TCR(COMMON_CFI(GR(11))) \
TCR(COMMON_CFI(GR(12))) \
TCR(COMMON_CFI(GR(13))) \
TCR(COMMON_CFI(GR(14))) \
TCR(COMMON_CFI(GR(15))) \
TCR(COMMON_CFI(GR(16))) \
@ -185,6 +210,8 @@ TCR(COMMON_CFI(GR(30))) \
TCR(COMMON_CFI(GR(31))) \
TCR(COMMON_CFI(LR)) \
TCR(COMMON_CFI(CR)) \
TCR(COMMON_CFI(CTR)) \
TCR(COMMON_CFI(XER)) \
TCR(COMMON_CFI(PC)) \
TCR(".cfi_return_column " S(REGNO_PC))
@ -198,10 +225,10 @@ TCR("# registers we're going to modify") \
TCR("stwu %r1,-16(%r1)") \
TCR("mflr %r0") \
TCR("stw %r0,20(%r1)") \
TCR("stw %r14,8(%r1)") \
TCR("stw %r" S(CFA_REG) ",8(%r1)") \
TCR("") \
TCR("# Setup r14 = sc_pregs, that we'll retrieve as our CFA value") \
TCR("mr %r14, %r7") \
TCR("# Setup CFA_REG = sc_pregs, that we'll retrieve as our CFA value") \
TCR("mr %r" S(CFA_REG) ", %r7") \
TCR("") \
TCR("# Call the real handler. The signo, siginfo and sigcontext") \
TCR("# arguments are the same as those we received in r3, r4 and r5") \
@ -209,7 +236,7 @@ TCR("mtctr %r6") \
TCR("bctrl") \
TCR("") \
TCR("# Restore our callee-saved items, release our frame and return") \
TCR("lwz %r14,8(%r1)") \
TCR("lwz %r" S(CFA_REG) ",8(%r1)") \
TCR("lwz %r0,20(%r1)") \
TCR("mtlr %r0") \
TCR("") \