aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/exp_ch4.adb21
-rw-r--r--gcc/ada/exp_ch5.adb14
-rw-r--r--gcc/ada/gnat_ugn.texi7
-rw-r--r--gcc/ada/sem_ch3.adb11
-rw-r--r--gcc/ada/sem_prag.adb1
6 files changed, 42 insertions, 26 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 251718f..85d42bd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,19 @@
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,
exp_aggr.adb: Minor reformatting.
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 2037950..27e6279 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -7596,15 +7596,13 @@ package body Exp_Ch4 is
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 --
@@ -7625,7 +7623,6 @@ package body Exp_Ch4 is
function Is_Subtype_Declaration return Boolean is
Par : constant Node_Id := Parent (N);
-
begin
return
Nkind (Par) = N_Index_Or_Discriminant_Constraint
@@ -7767,9 +7764,9 @@ package body Exp_Ch4 is
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
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index dad9427..51ae183 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -1934,13 +1934,13 @@ package body Exp_Ch5 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)
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index ba83f78..dd90a83 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -3961,10 +3961,9 @@ and @command{gcc} cannot be used to run the GNAT binder.
@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.
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 5de3b0ec..aa6f6b2 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -8631,8 +8631,15 @@ package body Sem_Ch3 is
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;
------------------------
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 4cab6b4..4d6a55c 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -4729,7 +4729,6 @@ package body Sem_Prag is
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);