Commit 39ce7604 by Arnaud Charlet

[multiple changes]

2013-01-02  Thomas Quinot  <quinot@adacore.com>

	* exp_prag.adb: Minor reformatting.

2013-01-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Get_Associated_Node): If the node is an
	identifier that denotes an unconstrained array in an object
	declaration, it is rewritten as the name of an anonymous
	subtype whose bounds are given by the initial expression in the
	declaration. When checking whether that identifier is global
	reference, use the original node, not the local generated subtype.

2013-01-02  Olivier Hainque  <hainque@adacore.com>

	* tracebak.c: Revert previous change, incomplete.

2013-01-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
	appears on a subprogram body that acts as a spec, place the
	corresponding pragma in the declarations of the body, so that
	e.g. pre/postcondition checks can be generated appropriately.

2013-01-02  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb: Minor reformatting and code reorganization.

From-SVN: r194781
parent 1824c168
2013-01-02 Thomas Quinot <quinot@adacore.com>
* exp_prag.adb: Minor reformatting.
2013-01-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Get_Associated_Node): If the node is an
identifier that denotes an unconstrained array in an object
declaration, it is rewritten as the name of an anonymous
subtype whose bounds are given by the initial expression in the
declaration. When checking whether that identifier is global
reference, use the original node, not the local generated subtype.
2013-01-02 Olivier Hainque <hainque@adacore.com>
* tracebak.c: Revert previous change, incomplete.
2013-01-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
appears on a subprogram body that acts as a spec, place the
corresponding pragma in the declarations of the body, so that
e.g. pre/postcondition checks can be generated appropriately.
2013-01-02 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting and code reorganization.
2013-01-02 Vincent Celier <celier@adacore.com>
* switch-m.adb (Normalize_Compiler_Switches): Record the
......
......@@ -4929,6 +4929,17 @@ package body Sem_Ch12 is
Assoc := Associated_Node (Assoc);
end if;
-- An additional special case: an unconstrained type in an object
-- declaration may have been rewritten as a local subtype constrained
-- by the expression in the declaration. We need to recover the
-- original entity which may be global.
if Present (Original_Node (Assoc))
and then Nkind (Parent (N)) = N_Object_Declaration
then
Assoc := Original_Node (Assoc);
end if;
return Assoc;
end if;
end Get_Associated_Node;
......
......@@ -1606,6 +1606,17 @@ package body Sem_Ch13 is
if Nkind (Parent (N)) = N_Compilation_Unit then
Add_Global_Declaration (Aitem);
-- If it is a subprogram body, add pragmas to list of
-- declarations in body.
elsif Nkind (N) = N_Subprogram_Body then
if No (Declarations (N)) then
Set_Declarations (N, New_List);
end if;
Append (Aitem, Declarations (N));
else
Insert_After (N, Aitem);
end if;
......
......@@ -13633,7 +13633,7 @@ package body Sem_Ch3 is
Alias_Subp : Entity_Id;
Act_List : Elist_Id;
Act_Elmt : Elmt_Id := No_Elmt;
Act_Elmt : Elmt_Id;
Act_Subp : Entity_Id := Empty;
Elmt : Elmt_Id;
Need_Search : Boolean := False;
......@@ -13656,6 +13656,9 @@ package body Sem_Ch3 is
if Present (Generic_Actual) then
Act_List := Collect_Primitive_Operations (Generic_Actual);
Act_Elmt := First_Elmt (Act_List);
else
Act_List := No_Elist;
Act_Elmt := No_Elmt;
end if;
-- Derive primitives inherited from the parent. Note that if the generic
......@@ -13857,8 +13860,10 @@ package body Sem_Ch3 is
declare
Iface_Prim_Loc : constant Source_Ptr :=
Original_Location (Sloc (Alias_Subp));
Elmt : Elmt_Id;
Prim : Entity_Id;
begin
Elmt :=
First_Elmt (Primitive_Operations (Generic_Actual));
......@@ -13868,8 +13873,8 @@ package body Sem_Ch3 is
if Present (Interface_Alias (Prim))
and then Original_Location
(Sloc (Interface_Alias (Prim)))
= Iface_Prim_Loc
(Sloc (Interface_Alias (Prim))) =
Iface_Prim_Loc
then
Act_Subp := Alias (Prim);
exit Search;
......
......@@ -287,10 +287,9 @@ __gnat_backtrace (void **array,
#error Unhandled darwin architecture.
#endif
/*---------------------- PPC AIX/PPC Lynx 178/Older Darwin ------------------*/
/*------------------------ PPC AIX/Older Darwin -------------------------*/
#elif ((defined (_POWER) && defined (_AIX)) || \
(defined (__powerpc__) && defined (__Lynx__) && !defined(__ELF__)) || \
(defined (__ppc__) && defined (__APPLE__)))
(defined (__ppc__) && defined (__APPLE__)))
#define USE_GENERIC_UNWINDER
......@@ -308,23 +307,9 @@ struct layout
should to feature a null backchain, AIX might expose a null return
address instead. */
/* Then LynxOS-178 features yet another variation, with return_address
== &__start, which we only add conditionally as this symbol is not
necessarily present elsewhere. Beware that &bla returns the
address of a descriptor when "bla" is a function. Getting the code
address requires an extra dereference. */
#if defined (__Lynx__)
extern void __start();
#define EXTRA_STOP_CONDITION(CURRENT) ((CURRENT)->return_address == *(void**)&__start)
#else
#define EXTRA_STOP_CONDITION(CURRENT) (0)
#endif
#define STOP_FRAME(CURRENT, TOP_STACK) \
(((void *) (CURRENT) < (TOP_STACK)) \
|| (CURRENT)->return_address == NULL \
|| EXTRA_STOP_CONDITION(CURRENT))
|| (CURRENT)->return_address == NULL)
/* The PPC ABI has an interesting specificity: the return address saved by a
function is located in it's caller's frame, and the save operation only
......
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