+2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_prag.adb (Analyze_Depends_In_Decl_Part,
+ Analyze_Global_In_Decl_Part,
+ Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
+ and its formals only when it is not already installed.
+ * sem_util.adb (Is_Refined_State): A state is refined when it
+ has a non-empty list of constituents.
+
+2013-10-14 Tristan Gingold <gingold@adacore.com>
+
+ * adaint.c: Disable __gnat_get_executable_load_address for linux.
+ * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
+
2013-10-14 Tristan Gingold <gingold@adacore.com>
* s-vmexta.ads: Add comments.
#if defined (__APPLE__)
return _dyld_get_image_header (0);
-#elif defined (__linux__)
+#elif 0 && defined (__linux__)
+ /* Currently disabled as it needs at least -ldl. */
struct link_map *map = _r_debug.r_map;
return (const void *)map->l_addr;
Code : Node_Id;
begin
+ -- Compute the symbol for the code of the condition
+
if Present (Interface_Name (Id)) then
Excep_Image := Strval (Interface_Name (Id));
else
Analyze (Expression (Lang_Char));
if Exception_Code (Id) /= No_Uint then
+
+ -- The code for the exception is present.Create a
+ -- linker alias to define the symbol.
+
Code :=
Make_Integer_Literal (Loc,
Intval => Exception_Code (Id));
+ -- Declare a dummy object
+
Excep_Object :=
Make_Object_Declaration (Loc,
Defining_Identifier => Excep_Internal,
Insert_Action (N, Excep_Object);
Analyze (Excep_Object);
+ -- Clear severity bits
+
Start_String;
Store_String_Int
(UI_To_Int (Exception_Code (Id)) / 8 * 8);
+ -- Insert a pragma Linker_Alias to set the value of
+ -- the dummy object symbol.
+
Excep_Alias :=
Make_Pragma (Loc,
Chars => Name_Linker_Alias,
Insert_Action (N, Excep_Alias);
Analyze (Excep_Alias);
+ -- Insert a pragma Export to give a Linker_Name to the
+ -- dummy object.
+
Export_Pragma :=
Make_Pragma (Loc,
Chars => Name_Export,
Strval => Excep_Image))));
end if;
+ -- Generate the call to Register_VMS_Exception
+
Rewrite (Call,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To
-- pertaining to subprogram declarations. Skip the installation
-- for subprogram bodies because the formals are already visible.
- if Current_Scope /= Subp_Id then
+ if not In_Open_Scopes (Subp_Id) then
Restore_Scope := True;
Push_Scope (Subp_Id);
Install_Formals (Subp_Id);
-- to subprogram declarations. Skip the installation for subprogram
-- bodies because the formals are already visible.
- if Current_Scope /= Spec_Id then
+ if not In_Open_Scopes (Spec_Id) then
Restore_Scope := True;
Push_Scope (Spec_Id);
Install_Formals (Spec_Id);
-- item. This falls out of the general rule of aspects pertaining to
-- subprogram declarations.
- if Current_Scope /= Spec_Id then
+ if not In_Open_Scopes (Spec_Id) then
Restore_Scope := True;
Push_Scope (Spec_Id);
Install_Formals (Spec_Id);
-- Ensure that the subprogram and its formals are visible when analyzing
-- the expression of the pragma.
- if Current_Scope /= Subp_Id then
+ if not In_Open_Scopes (Subp_Id) then
Restore_Scope := True;
Push_Scope (Subp_Id);
Install_Formals (Subp_Id);
return
Ekind (Item_Id) = E_Abstract_State
- and then Present (Refinement_Constituents (Item_Id));
+ and then not Is_Empty_Elmt_List
+ (Refinement_Constituents (Item_Id));
end if;
end Is_Refined_State;