+2011-08-03 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
+
+2011-08-03 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
+ for an itype created within a generic unit.
+
+2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
+ suppresses all inlining.
+
2011-08-03 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
function Is_Subtype_Declaration return Boolean;
-- The replacement of a discriminant reference by its value is required
- -- if this is part of the initialization of an temporary generated by
- -- a change of representation. This shows up as the construction of a
+ -- if this is part of the initialization of an temporary generated by a
+ -- change of representation. This shows up as the construction of a
-- discriminant constraint for a subtype declared at the same point as
- -- the entity in the prefix of the selected component.
- -- We recognize this case when the context of the reference is:
- --
- -- subtype ST is T(Obj.D);
- --
- -- The entity for Obj comes from source, and ST has the same sloc.
+ -- the entity in the prefix of the selected component. We recognize this
+ -- case when the context of the reference is:
+ -- subtype ST is T(Obj.D);
+ -- where the entity for Obj comes from source, and ST has the same sloc.
-----------------------
-- In_Left_Hand_Side --
function Is_Subtype_Declaration return Boolean is
Par : constant Node_Id := Parent (N);
-
begin
return
Nkind (Par) = N_Index_Or_Discriminant_Constraint
if Disc = Entity (Selector_Name (N))
and then (Is_Entity_Name (Dval)
- or else Nkind (Dval) = N_Integer_Literal
- or else Is_Subtype_Declaration
- or else Is_Static_Expression (Dval))
+ or else Nkind (Dval) = N_Integer_Literal
+ or else Is_Subtype_Declaration
+ or else Is_Static_Expression (Dval))
then
-- Here we have the matching discriminant. Check for
-- the case of a discriminant of a component that is
-- If the type is tagged, we may as well use the predefined
-- primitive assignment. This avoids inlining a lot of code
- -- and in the class-wide case, the assignment is replaced by a
- -- dispatching call to _assign. It is suppressed in the case of
- -- assignments created by the expander that correspond to
- -- initializations, where we do want to copy the tag
- -- (Expand_Ctrl_Actions flag is set True in this case).
- -- It is also suppressed if restriction No_Dispatching_Calls is
- -- in force because in that case predefined primitives are not
+ -- and in the class-wide case, the assignment is replaced
+ -- by a dispatching call to _assign. It is suppressed in the
+ -- case of assignments created by the expander that correspond
+ -- to initializations, where we do want to copy the tag
+ -- (Expand_Ctrl_Actions flag is set True in this case). It is
+ -- also suppressed if restriction No_Dispatching_Calls is in
+ -- force because in that case predefined primitives are not
-- generated.
or else (Is_Tagged_Type (Typ)
@item -fno-inline
@cindex @option{-fno-inline} (@command{gcc})
-Suppresses all back-end inlining, even if other optimization or inlining
-switches are set.
-This includes suppression of inlining that results
-from the use of the pragma @code{Inline_Always}.
+Suppresses all inlining, even if other optimization or inlining
+switches are set. This includes suppression of inlining that
+results from the use of the pragma @code{Inline_Always}.
Any occurrences of pragma @code{Inline} or @code{Inline_Always}
are ignored, and @option{-gnatn} and @option{-gnatN} have no
effect if this switch is present.
is
IR : constant Node_Id := Make_Itype_Reference (Sloc (Nod));
begin
- Set_Itype (IR, Ityp);
- Insert_After (Nod, IR);
+
+ -- Itype references are only created for use by the back-end.
+
+ if Inside_A_Generic then
+ return;
+ else
+ Set_Itype (IR, Ityp);
+ Insert_After (Nod, IR);
+ end if;
end Build_Itype_Reference;
------------------------
if Is_Generic_Instance (Subprogram_Def) then
Set_Encoded_Interface_Name
(Alias (Get_Base_Subprogram (Subprogram_Def)), Link_Nam);
-
else
Set_Encoded_Interface_Name
(Get_Base_Subprogram (Subprogram_Def), Link_Nam);