* exp_ch7.adb: Update comments.
2009-07-10 Arnaud Charlet <charlet@adacore.com>
* exp_ch13.adb (Expand_N_Record_Representation_Clause): Ignore mod
clause if -gnatI is set instead of crashing.
2009-07-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch11.adb (Same_Expression): Null is always equal to itself.
Additional work to remove redundant successive raise statements, in
this case access checks.
2009-07-10 Vincent Celier <celier@adacore.com>
* make.adb (Compile): Always create a deep copy of the mapping file
argument (-gnatem=...) as it may be deallocate/reallocate by
Normalize_Arguments.
2009-07-10 Javier Miranda <miranda@adacore.com>
* einfo.adb (Directly_Designated_Type): Add assertion.
* sem_res.adb (Check_Fully_Declared_Prefix): Add missing check on
access types before using attribute Directly_Designated_Type.
2009-07-10 Emmanuel Briot <briot@adacore.com>
* prj.ads: Minor typo fix
2009-07-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Add_Extra_Formal): Protected operations do no need
special treatment.
* exp_ch6.adb (Expand_Protected_Subprogram_Call): If rewritten
subprogram is a function call, resolve properly, to ensure that extra
actuals are added as needed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149474
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-07-10 Thomas Quinot <quinot@adacore.com>
+ * exp_ch7.adb: Update comments.
+
+2009-07-10 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_ch13.adb (Expand_N_Record_Representation_Clause): Ignore mod
+ clause if -gnatI is set instead of crashing.
+
+2009-07-10 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch11.adb (Same_Expression): Null is always equal to itself.
+ Additional work to remove redundant successive raise statements, in
+ this case access checks.
+
+2009-07-10 Vincent Celier <celier@adacore.com>
+
+ * make.adb (Compile): Always create a deep copy of the mapping file
+ argument (-gnatem=...) as it may be deallocate/reallocate by
+ Normalize_Arguments.
+
+2009-07-10 Javier Miranda <miranda@adacore.com>
+
+ * einfo.adb (Directly_Designated_Type): Add assertion.
+
+ * sem_res.adb (Check_Fully_Declared_Prefix): Add missing check on
+ access types before using attribute Directly_Designated_Type.
+
+2009-07-10 Emmanuel Briot <briot@adacore.com>
+
+ * prj.ads: Minor typo fix
+
+2009-07-10 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb (Add_Extra_Formal): Protected operations do no need
+ special treatment.
+
+ * exp_ch6.adb (Expand_Protected_Subprogram_Call): If rewritten
+ subprogram is a function call, resolve properly, to ensure that extra
+ actuals are added as needed.
+
+2009-07-10 Thomas Quinot <quinot@adacore.com>
+
* sem_aggr.adb: Minor comments editing
* exp_tss.adb, exp_ch3.adb: Minor reformatting
function Directly_Designated_Type (Id : E) return E is
begin
+ pragma Assert (Is_Access_Type (Id));
return Node20 (Id);
end Directly_Designated_Type;
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- 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- --
AtM_Nod : Node_Id;
begin
- if Present (Mod_Clause (N)) then
+ if Present (Mod_Clause (N)) and then not Ignore_Rep_Clauses then
Mod_Val := Expr_Value (Expression (Mod_Clause (N)));
Citems := Pragmas_Before (Mod_Clause (N));
(Passoc, Next_Named_Actual (Parent (Temp)));
end loop;
end;
+
end if;
end;
end if;
end if;
- Analyze (N);
-
-- If it is a function call it can appear in elaboration code and
-- the called entity must be frozen here.
if Ekind (Subp) = E_Function then
Freeze_Expression (Name (N));
end if;
+
+ -- Analyze and resolve the new call. The actuals have already been
+ -- resolved, but expansion of a function call will add extra actuals
+ -- if needed. Analysis of a procedure call already includes resolution.
+
+ Analyze (N);
+
+ if Ekind (Subp) = E_Function then
+ Resolve (N, Etype (Subp));
+ end if;
+
end Expand_Protected_Subprogram_Call;
--------------------------------
-- If the type is declared in a package declaration and designates a
-- Taft amendment type that requires finalization, place declaration
- -- of finaliztion list in the body, because no client of the package
- -- can create objects of the type and thus make use of this list.
+ -- of finalization list in the body, because no client of the package
+ -- can create objects of the type and thus make use of this list. This
+ -- ensures the tree for the spec is identical whenever it is compiled.
if Has_Completion_In_Body (Directly_Designated_Type (Typ))
and then In_Package_Body (Current_Scope)
end if;
end if;
- if Create_Mapping_File then
+ if Create_Mapping_File and then Mapping_File_Arg /= null then
Comp_Last := Comp_Last + 1;
- Comp_Args (Comp_Last) := Mapping_File_Arg;
+ Comp_Args (Comp_Last) := new String'(Mapping_File_Arg.all);
end if;
Get_Name_String (S);
Unit : Unit_Index := No_Unit_Index;
-- Name of the unit, if language is unit based. This is only set for
- -- those finles that are part of the compilation set (for instance a
+ -- those files that are part of the compilation set (for instance a
-- file in an extended project that is overridden will not have this
-- field set).
return Same_Expression (Left_Opnd (C1), Left_Opnd (C2))
and then Same_Expression (Right_Opnd (C1), Right_Opnd (C2));
+ elsif Nkind (C1) = N_Null then
+ return True;
+
else
return False;
end if;
(No (P_Formal)
or else Present (Extra_Accessibility (P_Formal)))
then
- -- Temporary kludge: for now we avoid creating the extra formal
- -- for access parameters of protected operations because of
- -- problem with the case of internal protected calls. ???
-
- if Nkind (Parent (Parent (Parent (E)))) /= N_Protected_Definition
- and then Nkind (Parent (Parent (Parent (E)))) /= N_Protected_Body
- then
- Set_Extra_Accessibility
- (Formal, Add_Extra_Formal (Formal, Standard_Natural, E, "F"));
- end if;
+ Set_Extra_Accessibility
+ (Formal, Add_Extra_Formal (Formal, Standard_Natural, E, "F"));
end if;
-- This label is required when skipping extra formal generation for
elsif Ada_Version >= Ada_05
and then Is_Entity_Name (Pref)
+ and then Is_Access_Type (Etype (Pref))
and then Ekind (Directly_Designated_Type (Etype (Pref))) =
E_Incomplete_Type
and then Is_Tagged_Type (Directly_Designated_Type (Etype (Pref)))