summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 12:58:22 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 12:58:22 +0000
commit97d14ea2997ec71ae36b49b33610b295f2cf75c2 (patch)
tree101be37eb6b24b438927cbeac6c68bfcf9502723 /gcc
parentb379e58c47468b3d5eff1fd4c8d73a874a17df90 (diff)
downloadgcc-97d14ea2997ec71ae36b49b33610b295f2cf75c2.tar.gz
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.adb (Overridden_Operation): assert that function is called for valid arguments. * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb, s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads, sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb, sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb, s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb: No space after closing parenthesis except where required for layout. * sem_res.adb: Minor reformatting. 2016-04-18 Arnaud Charlet <charlet@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case statement when relevant. 2016-04-18 Bob Duff <duff@adacore.com> * a-cuprqu.adb (Enqueue): Properly handle the case where the new element has a unique priority. 2016-04-18 Tristan Gingold <gingold@adacore.com> * adaint.h: Define stat structures and functions for iOS simulator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235146 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog28
-rw-r--r--gcc/ada/a-chtgbo.ads2
-rw-r--r--gcc/ada/a-chtgop.ads2
-rw-r--r--gcc/ada/a-cofove.adb4
-rw-r--r--gcc/ada/a-cuprqu.adb9
-rw-r--r--gcc/ada/a-ngcefu.adb6
-rw-r--r--gcc/ada/adaint.h24
-rw-r--r--gcc/ada/einfo.adb9
-rw-r--r--gcc/ada/einfo.ads6
-rw-r--r--gcc/ada/exp_ch4.adb182
-rw-r--r--gcc/ada/exp_ch6.adb4
-rw-r--r--gcc/ada/freeze.adb2
-rw-r--r--gcc/ada/i-cobol.ads6
-rw-r--r--gcc/ada/par-ch5.adb2
-rw-r--r--gcc/ada/s-bignum.adb10
-rw-r--r--gcc/ada/s-osinte-vxworks.ads2
-rw-r--r--gcc/ada/s-rannum.adb2
-rw-r--r--gcc/ada/sem.adb2
-rw-r--r--gcc/ada/sem_aggr.adb8
-rw-r--r--gcc/ada/sem_ch10.adb2
-rw-r--r--gcc/ada/sem_ch12.adb2
-rw-r--r--gcc/ada/sem_ch3.adb4
-rw-r--r--gcc/ada/sem_ch5.adb2
-rw-r--r--gcc/ada/sem_prag.adb2
-rw-r--r--gcc/ada/sem_res.adb7
-rw-r--r--gcc/ada/sem_type.adb2
-rw-r--r--gcc/ada/sem_util.adb4
27 files changed, 225 insertions, 110 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 47029de63f0..cc95c820b13 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,33 @@
2016-04-18 Arnaud Charlet <charlet@adacore.com>
+ * einfo.adb (Overridden_Operation): assert that
+ function is called for valid arguments.
+ * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
+ s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
+ sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
+ sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
+ s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
+ No space after closing parenthesis except where required for
+ layout.
+ * sem_res.adb: Minor reformatting.
+
+2016-04-18 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
+ statement when relevant.
+
+2016-04-18 Bob Duff <duff@adacore.com>
+
+ * a-cuprqu.adb (Enqueue): Properly handle the
+ case where the new element has a unique priority.
+
+2016-04-18 Tristan Gingold <gingold@adacore.com>
+
+ * adaint.h: Define stat structures and functions for iOS
+ simulator.
+
+2016-04-18 Arnaud Charlet <charlet@adacore.com>
+
* sem_res.adb (Resolve_Entry_Call): reset
Is_Overloaded flag after resolving calls to overloaded protected
operations.
diff --git a/gcc/ada/a-chtgbo.ads b/gcc/ada/a-chtgbo.ads
index 892bdaaf1df..184cefc4d83 100644
--- a/gcc/ada/a-chtgbo.ads
+++ b/gcc/ada/a-chtgbo.ads
@@ -81,7 +81,7 @@ package Ada.Containers.Hash_Tables.Generic_Bounded_Operations is
procedure Clear (HT : in out Hash_Table_Type'Class);
-- Deallocates each node in hash table HT. (Note that it only deallocates
- -- the nodes, not the buckets array.) Program_Error is raised if the hash
+ -- the nodes, not the buckets array.) Program_Error is raised if the hash
-- table is busy.
procedure Delete_Node_At_Index
diff --git a/gcc/ada/a-chtgop.ads b/gcc/ada/a-chtgop.ads
index 4a7fbd6c743..1b865dcbd29 100644
--- a/gcc/ada/a-chtgop.ads
+++ b/gcc/ada/a-chtgop.ads
@@ -107,7 +107,7 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
procedure Clear (HT : in out Hash_Table_Type);
-- Deallocates each node in hash table HT. (Note that it only deallocates
- -- the nodes, not the buckets array.) Program_Error is raised if the hash
+ -- the nodes, not the buckets array.) Program_Error is raised if the hash
-- table is busy.
procedure Move (Target, Source : in out Hash_Table_Type);
diff --git a/gcc/ada/a-cofove.adb b/gcc/ada/a-cofove.adb
index ac8208593b6..529a73b9e25 100644
--- a/gcc/ada/a-cofove.adb
+++ b/gcc/ada/a-cofove.adb
@@ -95,7 +95,7 @@ is
procedure Append (Container : in out Vector; New_Item : Vector) is
begin
- for X in First_Index (New_Item) .. Last_Index (New_Item) loop
+ for X in First_Index (New_Item) .. Last_Index (New_Item) loop
Append (Container, Element (New_Item, X));
end loop;
end Append;
@@ -119,7 +119,7 @@ is
raise Constraint_Error with "vector is already at its maximum length";
end if;
- -- TODO: should check whether length > max capacity (cnt_t'last) ???
+ -- TODO: should check whether length > max capacity (cnt_t'last) ???
Container.Last := Container.Last + 1;
Elems (Container) (Length (Container)) := New_Item;
diff --git a/gcc/ada/a-cuprqu.adb b/gcc/ada/a-cuprqu.adb
index 7502aa97cd8..5fb74cc098f 100644
--- a/gcc/ada/a-cuprqu.adb
+++ b/gcc/ada/a-cuprqu.adb
@@ -194,6 +194,15 @@ package body Ada.Containers.Unbounded_Priority_Queues is
-- must update.
List.Header.Next_Unequal := Node;
+
+ elsif Before (Get_Priority (Prev.Element), P) then
+
+ -- If the new item inserted has a unique priority in queue (not
+ -- same priority as precedent), set Next_Unequal of precedent
+ -- element to the new element instead of old next element, since
+ -- Before (P, Get_Priority (Next.Element) or Next = H).
+
+ Prev.Next_Unequal := Node;
end if;
pragma Assert (List.Header.Next_Unequal = List.Header.Next);
diff --git a/gcc/ada/a-ngcefu.adb b/gcc/ada/a-ngcefu.adb
index 87a1dc9e160..abe7e3dac6d 100644
--- a/gcc/ada/a-ngcefu.adb
+++ b/gcc/ada/a-ngcefu.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, 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- --
@@ -78,7 +78,7 @@ package body Ada.Numerics.Generic_Complex_Elementary_Functions is
elsif Re (Left) = 0.0 and then Im (Left) = 0.0 then
return Left;
- elsif Right = (0.0, 0.0) then
+ elsif Right = (0.0, 0.0) then
return Complex_One;
elsif Re (Right) = 0.0 and then Im (Right) = 0.0 then
@@ -417,7 +417,7 @@ package body Ada.Numerics.Generic_Complex_Elementary_Functions is
begin
return
Compose_From_Cartesian
- (Cos (Re (X)) * Cosh (Im (X)),
+ (Cos (Re (X)) * Cosh (Im (X)),
-(Sin (Re (X)) * Sinh (Im (X))));
end Cos;
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 5df192677c5..2559a31ea84 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -67,6 +67,30 @@ extern "C" {
#define GNAT_LSTAT lstat
#define GNAT_STRUCT_STAT struct stat64
+#elif defined(__APPLE__)
+
+# include <TargetConditionals.h>
+
+# if TARGET_IPHONE_SIMULATOR
+ /* On iOS (simulator or not), the stat structure is the 64 bit one.
+ But the simulator uses the MacOS X syscalls that aren't 64 bit.
+ Fix this interfacing issue here. */
+ int fstat64(int, struct stat *);
+ int stat64(const char *, struct stat *);
+ int lstat64(const char *, struct stat *);
+# define GNAT_STAT stat64
+# define GNAT_FSTAT fstat64
+# define GNAT_LSTAT lstat64
+# else
+# define GNAT_STAT stat
+# define GNAT_FSTAT fstat
+# define GNAT_LSTAT lstat
+# endif
+
+# define GNAT_FOPEN fopen
+# define GNAT_OPEN open
+# define GNAT_STRUCT_STAT struct stat
+
#else
#define GNAT_FOPEN fopen
#define GNAT_OPEN open
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index a43bff5bf07..e0a9b174d07 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -2365,13 +2365,13 @@ package body Einfo is
function Is_Predicate_Function (Id : E) return B is
begin
- pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
return Flag255 (Id);
end Is_Predicate_Function;
function Is_Predicate_Function_M (Id : E) return B is
begin
- pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
return Flag256 (Id);
end Is_Predicate_Function_M;
@@ -2835,6 +2835,7 @@ package body Einfo is
function Overridden_Operation (Id : E) return E is
begin
+ pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
return Node26 (Id);
end Overridden_Operation;
@@ -5393,13 +5394,13 @@ package body Einfo is
procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
begin
- pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
Set_Flag255 (Id, V);
end Set_Is_Predicate_Function;
procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
begin
- pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
+ pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
Set_Flag256 (Id, V);
end Set_Is_Predicate_Function_M;
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 76520c8d189..e0b1f26d677 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -3385,7 +3385,7 @@ package Einfo is
-- Needs_No_Actuals (Flag22)
-- Defined in callable entities (subprograms, entries, access to
--- subprograms) which can be called without actuals because all of
+-- subprograms) which can be called without actuals because all of
-- their formals (if any) have default values. This flag simplifies the
-- resolution of the syntactic ambiguity involving a call to these
-- entities when the return type is an array type, and a call can be
@@ -4471,7 +4471,7 @@ package Einfo is
-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
-- freeze node, which appears later in the expanded tree.
--- a) The flag is used by the front-end to trigger expansion actions
+-- a) The flag is used by the front-end to trigger expansion actions
-- which include the generation of that freeze node. Typically this happens at
-- the end of the current compilation unit, or before the first subprogram
-- body is encountered in the current unit. See files freeze and exp_ch13 for
@@ -4479,7 +4479,7 @@ package Einfo is
-- construction of initialization procedures and dispatch tables.
-- b) The flag is used by the backend to defer elaboration of the entity until
--- its freeze node is seen. In the absence of an explicit freeze node, an
+-- its freeze node is seen. In the absence of an explicit freeze node, an
-- entity is frozen (and elaborated) at the point of declaration.
-- For object declarations, the flag is set when an address clause for the
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 2832d615c76..3a323b3840b 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -4845,16 +4845,19 @@ package body Exp_Ch4 is
------------------------------
procedure Expand_N_Case_Expression (N : Node_Id) is
- Loc : constant Source_Ptr := Sloc (N);
- Typ : constant Entity_Id := Etype (N);
- Cstmt : Node_Id;
- Decl : Node_Id;
- Tnn : Entity_Id;
- Pnn : Entity_Id;
- Actions : List_Id;
- Ttyp : Entity_Id;
- Alt : Node_Id;
- Fexp : Node_Id;
+ Loc : constant Source_Ptr := Sloc (N);
+ Typ : constant Entity_Id := Etype (N);
+ Acts : List_Id;
+ Alt : Node_Id;
+ Case_Stmt : Node_Id;
+ Decl : Node_Id;
+ Expr : Node_Id;
+ In_Predicate : Boolean := False;
+ Optimize_Return_Stmt : Boolean := False;
+ Par : Node_Id;
+ Ptr_Typ : Entity_Id;
+ Target : Entity_Id;
+ Target_Typ : Entity_Id;
begin
-- Check for MINIMIZED/ELIMINATED overflow mode
@@ -4870,10 +4873,13 @@ package body Exp_Ch4 is
if Ekind_In (Current_Scope, E_Function, E_Procedure)
and then Is_Predicate_Function (Current_Scope)
- and then
- Has_Static_Predicate_Aspect (Etype (First_Entity (Current_Scope)))
then
- return;
+ In_Predicate := True;
+
+ if Has_Static_Predicate_Aspect (Etype (First_Entity (Current_Scope)))
+ then
+ return;
+ end if;
end if;
-- We expand
@@ -4883,35 +4889,54 @@ package body Exp_Ch4 is
-- to
-- do
- -- Tnn : typ;
+ -- Target : typ;
-- case X is
-- when A =>
- -- Tnn := AX;
+ -- Target := AX;
-- when B =>
- -- Tnn := BX;
+ -- Target := BX;
-- ...
-- end case;
- -- in Tnn end;
+ -- in Target end;
+
+ -- Except when the case expression appears as part of a simple return
+ -- statement, returning an elementary type, where we expand
- -- However, this expansion is wrong for limited types, and also
- -- wrong for unconstrained types (since the bounds may not be the
- -- same in all branches). Furthermore it involves an extra copy
- -- for large objects. So we take care of this by using the following
- -- modified expansion for non-elementary types:
+ -- return (case X is when A => AX, when B => BX ...)
+
+ -- to
+
+ -- case X is
+ -- when A =>
+ -- return AX;
+ -- when B =>
+ -- return BX;
+ -- ...
+ -- end case;
+
+ -- Note that this expansion is also triggered for expression functions
+ -- containing a single case expression since these functions are
+ -- expanded as above.
+
+ -- However, this expansion is wrong for limited types, and also wrong
+ -- for unconstrained types (since the bounds may not be the same in all
+ -- branches). Furthermore it involves an extra copy for large objects.
+ -- So we take care of this by using the following modified expansion for
+ -- non-elementary types:
-- do
- -- type Pnn is access all typ;
- -- Tnn : Pnn;
+ -- type Ptr_Typ is access all typ;
+ -- Target : Ptr_Typ;
-- case X is
-- when A =>
- -- T := AX'Unrestricted_Access;
+ -- Target := AX'Unrestricted_Access;
-- when B =>
- -- T := BX'Unrestricted_Access;
+ -- Target := BX'Unrestricted_Access;
-- ...
-- end case;
- -- in Tnn.all end;
+ -- in Target.all end;
- Cstmt :=
+ Case_Stmt :=
Make_Case_Statement (Loc,
Expression => Expression (N),
Alternatives => New_List);
@@ -4921,99 +4946,126 @@ package body Exp_Ch4 is
-- the premature finalization of controlled objects found within the
-- case statement.
- Set_From_Conditional_Expression (Cstmt);
-
- Actions := New_List;
+ Set_From_Conditional_Expression (Case_Stmt);
+ Acts := New_List;
-- Scalar case
if Is_Elementary_Type (Typ) then
- Ttyp := Typ;
+ Target_Typ := Typ;
+
+ -- ??? Do not perform the optimization when the return statement is
+ -- within a predicate function as this causes supurious errors. A
+ -- possible mismatch in handling this case somewhere else in semantic
+ -- analysis?
+
+ if not In_Predicate
+ and then Nkind (Parent (N)) = N_Simple_Return_Statement
+ then
+ Optimize_Return_Stmt := True;
+ end if;
else
- Pnn := Make_Temporary (Loc, 'P');
- Append_To (Actions,
+ Ptr_Typ := Make_Temporary (Loc, 'P');
+ Append_To (Acts,
Make_Full_Type_Declaration (Loc,
- Defining_Identifier => Pnn,
+ Defining_Identifier => Ptr_Typ,
Type_Definition =>
Make_Access_To_Object_Definition (Loc,
All_Present => True,
Subtype_Indication => New_Occurrence_Of (Typ, Loc))));
- Ttyp := Pnn;
+ Target_Typ := Ptr_Typ;
end if;
- Tnn := Make_Temporary (Loc, 'T');
+ if not Optimize_Return_Stmt then
+ Target := Make_Temporary (Loc, 'T');
- -- Create declaration for target of expression, and indicate that it
- -- does not require initialization.
+ -- Create declaration for target of expression, and indicate that it
+ -- does not require initialization.
- Decl :=
- Make_Object_Declaration (Loc,
- Defining_Identifier => Tnn,
- Object_Definition => New_Occurrence_Of (Ttyp, Loc));
- Set_No_Initialization (Decl);
- Append_To (Actions, Decl);
+ Decl :=
+ Make_Object_Declaration (Loc,
+ Defining_Identifier => Target,
+ Object_Definition => New_Occurrence_Of (Target_Typ, Loc));
+ Set_No_Initialization (Decl);
+ Append_To (Acts, Decl);
+ end if;
-- Now process the alternatives
Alt := First (Alternatives (N));
while Present (Alt) loop
declare
- Aexp : Node_Id := Expression (Alt);
- Aloc : constant Source_Ptr := Sloc (Aexp);
- Stats : List_Id;
+ Alt_Expr : Node_Id := Expression (Alt);
+ Alt_Loc : constant Source_Ptr := Sloc (Alt_Expr);
+ Stmts : List_Id;
begin
-- As described above, take Unrestricted_Access for case of non-
-- scalar types, to avoid big copies, and special cases.
if not Is_Elementary_Type (Typ) then
- Aexp :=
- Make_Attribute_Reference (Aloc,
- Prefix => Relocate_Node (Aexp),
+ Alt_Expr :=
+ Make_Attribute_Reference (Alt_Loc,
+ Prefix => Relocate_Node (Alt_Expr),
Attribute_Name => Name_Unrestricted_Access);
end if;
- Stats := New_List (
- Make_Assignment_Statement (Aloc,
- Name => New_Occurrence_Of (Tnn, Loc),
- Expression => Aexp));
+ if Optimize_Return_Stmt then
+ Stmts := New_List (
+ Make_Simple_Return_Statement (Alt_Loc,
+ Expression => Alt_Expr));
+ else
+ Stmts := New_List (
+ Make_Assignment_Statement (Alt_Loc,
+ Name => New_Occurrence_Of (Target, Loc),
+ Expression => Alt_Expr));
+ end if;
-- Propagate declarations inserted in the node by Insert_Actions
-- (for example, temporaries generated to remove side effects).
-- These actions must remain attached to the alternative, given
-- that they are generated by the corresponding expression.
- if Present (Sinfo.Actions (Alt)) then
- Prepend_List (Sinfo.Actions (Alt), Stats);
+ if Present (Actions (Alt)) then
+ Prepend_List (Actions (Alt), Stmts);
end if;
Append_To
- (Alternatives (Cstmt),
+ (Alternatives (Case_Stmt),
Make_Case_Statement_Alternative (Sloc (Alt),
Discrete_Choices => Discrete_Choices (Alt),
- Statements => Stats));
+ Statements => Stmts));
end;
Next (Alt);
end loop;
- Append_To (Actions, Cstmt);
+ -- Rewrite parent return statement as a case statement if possible
+
+ if Optimize_Return_Stmt then
+ Par := Parent (N);
+ Rewrite (Par, Case_Stmt);
+ Analyze (Par);
+ return;
+ end if;
+
+ Append_To (Acts, Case_Stmt);
-- Construct and return final expression with actions
if Is_Elementary_Type (Typ) then
- Fexp := New_Occurrence_Of (Tnn, Loc);
+ Expr := New_Occurrence_Of (Target, Loc);
else
- Fexp :=
+ Expr :=
Make_Explicit_Dereference (Loc,
- Prefix => New_Occurrence_Of (Tnn, Loc));
+ Prefix => New_Occurrence_Of (Target, Loc));
end if;
Rewrite (N,
Make_Expression_With_Actions (Loc,
- Expression => Fexp,
- Actions => Actions));
+ Expression => Expr,
+ Actions => Acts));
Analyze_And_Resolve (N, Typ);
end Expand_N_Case_Expression;
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index b1d4293146c..704a5c04dd3 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -3707,7 +3707,7 @@ package body Exp_Ch6 is
Make_Explicit_Dereference (Loc,
Prefix => Nam);
- if Present (Parameter_Associations (Call_Node)) then
+ if Present (Parameter_Associations (Call_Node)) then
Parm := Parameter_Associations (Call_Node);
else
Parm := New_List;
@@ -3790,7 +3790,7 @@ package body Exp_Ch6 is
(RTE (RE_Address), Relocate_Node (First_Actual (Call_Node))));
return;
- elsif Is_Null_Procedure (Subp) then
+ elsif Is_Null_Procedure (Subp) then
Rewrite (Call_Node, Make_Null_Statement (Loc));
return;
end if;
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 556c23adbd4..dd91f8028a1 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -8318,7 +8318,7 @@ package body Freeze is
-- Add friendly warning if initialization comes from a packed array
-- component.
- if Is_Record_Type (Typ) then
+ if Is_Record_Type (Typ) then
declare
Comp : Entity_Id;
diff --git a/gcc/ada/i-cobol.ads b/gcc/ada/i-cobol.ads
index ad885e4a91a..9edcc0194da 100644
--- a/gcc/ada/i-cobol.ads
+++ b/gcc/ada/i-cobol.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (ASCII Version) --
-- --
--- Copyright (C) 1993-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1993-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
@@ -439,8 +439,8 @@ package Interfaces.COBOL is
function To_Decimal (Item : Binary) return Num;
function To_Decimal (Item : Long_Binary) return Num;
- function To_Binary (Item : Num) return Binary;
- function To_Long_Binary (Item : Num) return Long_Binary;
+ function To_Binary (Item : Num) return Binary;
+ function To_Long_Binary (Item : Num) return Long_Binary;
private
pragma Inline (Length);
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index a7d0e5a3d7b..1aecca6b12d 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -42,7 +42,7 @@ package body Ch5 is
function P_Label return Node_Id;
function P_Null_Statement return Node_Id;
- function P_Assignment_Statement (LHS : Node_Id) return Node_Id;
+ function P_Assignment_Statement (LHS : Node_Id) return Node_Id;
-- Parse assignment statement. On entry, the caller has scanned the left
-- hand side (passed in as Lhs), and the colon-equal (or some symbol
-- taken to be an error equivalent such as equal).
diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb
index 0c20a5b9520..18f62c7d235 100644
--- a/gcc/ada/s-bignum.adb
+++ b/gcc/ada/s-bignum.adb
@@ -147,7 +147,7 @@ package body System.Bignums is
for J in reverse 1 .. X'Last loop
RD := RD + DD (X (J));
- if J >= 1 + (X'Last - Y'Last) then
+ if J >= 1 + (X'Last - Y'Last) then
RD := RD + DD (Y (J - (X'Last - Y'Last)));
end if;
@@ -189,7 +189,7 @@ package body System.Bignums is
for J in reverse 1 .. X'Last loop
RD := RD + DD (X (J));
- if J >= 1 + (X'Last - Y'Last) then
+ if J >= 1 + (X'Last - Y'Last) then
RD := RD - DD (Y (J - (X'Last - Y'Last)));
end if;
@@ -840,9 +840,9 @@ package body System.Bignums is
Carry := 0;
for J in reverse 1 .. n loop
- Tmp := DD (v (J)) * d + Carry;
- v (J) := LSD (Tmp);
- Carry := Tmp / Base;
+ Tmp := DD (v (J)) * d + Carry;
+ v (J) := LSD (Tmp);
+ Carry := Tmp / Base;
end loop;
pragma Assert (Carry = 0);
diff --git a/gcc/ada/s-osinte-vxworks.ads b/gcc/ada/s-osinte-vxworks.ads
index ba76dcdf347..0129b593b0f 100644
--- a/gcc/ada/s-osinte-vxworks.ads
+++ b/gcc/ada/s-osinte-vxworks.ads
@@ -284,7 +284,7 @@ package System.OS_Interface is
OK : constant STATUS := 0;
ERROR : constant STATUS := Interfaces.C.int (-1);
- function taskIdVerify (tid : t_id) return STATUS;
+ function taskIdVerify (tid : t_id) return STATUS;
pragma Import (C, taskIdVerify, "taskIdVerify");
function taskIdSelf return t_id;
diff --git a/gcc/ada/s-rannum.adb b/gcc/ada/s-rannum.adb
index acebbaf8a6b..c024249ad09 100644
--- a/gcc/ada/s-rannum.adb
+++ b/gcc/ada/s-rannum.adb
@@ -208,7 +208,7 @@ is
G.I := I;
Y := Y xor Shift_Right (Y, U);
- Y := Y xor (Shift_Left (Y, S) and B_Mask);
+ Y := Y xor (Shift_Left (Y, S) and B_Mask);
Y := Y xor (Shift_Left (Y, T) and C_Mask);
Y := Y xor Shift_Right (Y, L);
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index f6f4a91b43f..a6061ead8c5 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -2039,7 +2039,7 @@ package body Sem is
-- The flag Withed_Body on a context clause indicates that a
-- unit contains an instantiation that may be needed later,
-- and therefore the body that contains the generic body (and
- -- its context) must be traversed immediately after the
+ -- its context) must be traversed immediately after the
-- corresponding spec (see Do_Unit_And_Dependents).
-- The main unit itself is processed separately after all other
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 4657336e726..25022e95a9e 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -479,7 +479,7 @@ package body Sem_Aggr is
else
if Compile_Time_Known_Value (This_Low) then
if not Compile_Time_Known_Value (Aggr_Low (Dim)) then
- Aggr_Low (Dim) := This_Low;
+ Aggr_Low (Dim) := This_Low;
elsif Expr_Value (This_Low) /= Expr_Value (Aggr_Low (Dim)) then
Set_Raises_Constraint_Error (N);
@@ -491,7 +491,7 @@ package body Sem_Aggr is
if Compile_Time_Known_Value (This_High) then
if not Compile_Time_Known_Value (Aggr_High (Dim)) then
- Aggr_High (Dim) := This_High;
+ Aggr_High (Dim) := This_High;
elsif
Expr_Value (This_High) /= Expr_Value (Aggr_High (Dim))
@@ -1842,7 +1842,7 @@ package body Sem_Aggr is
Errors_Posted_On_Choices : Boolean := False;
-- Keeps track of whether any choices have semantic errors
- function Empty_Range (A : Node_Id) return Boolean;
+ function Empty_Range (A : Node_Id) return Boolean;
-- If an association covers an empty range, some warnings on the
-- expression of the association can be disabled.
@@ -1850,7 +1850,7 @@ package body Sem_Aggr is
-- Empty_Range --
-----------------
- function Empty_Range (A : Node_Id) return Boolean is
+ function Empty_Range (A : Node_Id) return Boolean is
R : constant Node_Id := First (Choices (A));
begin
return No (Next (R))
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 022edfe03e3..53ff828d20c 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -879,7 +879,7 @@ package body Sem_Ch10 is
end if;
-- All components of the context: with-clauses, library unit, ancestors
- -- if any, (and their context) are analyzed and installed.
+ -- if any, (and their context) are analyzed and installed.
-- Call special debug routine sm if this is the main unit
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 5508c9b9eda..125b877e6d9 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1324,7 +1324,7 @@ package body Sem_Ch12 is
-- Process_Default --
---------------------
- procedure Process_Default (F : Entity_Id) is
+ procedure Process_Default (F : Entity_Id) is
Loc : constant Source_Ptr := Sloc (I_Node);
F_Id : constant Entity_Id := Defining_Entity (F);
Decl : Node_Id;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 56e8a74f2bf..f41b8e99b0c 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -3168,7 +3168,7 @@ package body Sem_Ch3 is
end loop;
end if;
- if Is_Integer_Type (T) then
+ if Is_Integer_Type (T) then
Resolve (E, T);
Set_Etype (Id, Universal_Integer);
Set_Ekind (Id, E_Named_Integer);
@@ -14522,7 +14522,7 @@ package body Sem_Ch3 is
-- of the derived type are not relevant, and thus we can use
-- the base type for the formals. However, the return type may be
-- used in a context that requires that the proper static bounds
- -- be used (a case statement, for example) and for those cases
+ -- be used (a case statement, for example) and for those cases
-- we must use the derived type (first subtype), not its base.
-- If the derived_type_definition has no constraints, we know that
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 62eea8c6cd9..657a0e45dfa 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -803,7 +803,7 @@ package body Sem_Ch5 is
Set_Referenced_Modified (Lhs, Out_Param => False);
end if;
- -- RM 7.3.2 (12/3) An assignment to a view conversion (from a type
+ -- RM 7.3.2 (12/3): An assignment to a view conversion (from a type
-- to one of its ancestors) requires an invariant check. Apply check
-- only if expression comes from source, otherwise it will be applied
-- when value is assigned to source entity.
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 27a44d8cc5b..8e27d80f79f 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -4652,7 +4652,7 @@ package body Sem_Prag is
then
OK := True;
- -- If the aspect is a predicate (possibly others ???) and the
+ -- If the aspect is a predicate (possibly others ???) and the
-- context is a record type, this is a discriminant expression
-- within a type declaration, that freezes the predicated
-- subtype.
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 1dfa862b3df..5a6d3925273 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -7657,14 +7657,15 @@ package body Sem_Res is
-- Reset the Is_Overloaded flag, since resolution is now completed
+ -- Simple entry call
+
if Nkind (Entry_Name) = N_Selected_Component then
- -- Simple entry call
Set_Is_Overloaded (Selector_Name (Entry_Name), False);
+ -- Call to a member of an entry family
+
else pragma Assert (Nkind (Entry_Name) = N_Indexed_Component);
- -- Call to member of entry family
Set_Is_Overloaded (Selector_Name (Prefix (Entry_Name)), False);
-
end if;
end if;
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index 131beb90079..eddc54b8baa 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -2975,7 +2975,7 @@ package body Sem_Type is
-- New_Interps --
-----------------
- procedure New_Interps (N : Node_Id) is
+ procedure New_Interps (N : Node_Id) is
Map_Ptr : Int;
begin
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 88973765a3a..e57cd930e11 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -6301,7 +6301,7 @@ package body Sem_Util is
end loop;
end if;
- if Present (Prev_Vis) then
+ if Present (Prev_Vis) then
-- Skip E in the visibility chain
@@ -12240,7 +12240,7 @@ package body Sem_Util is
else
Indx_Typ := Etype (Indx);
- if Is_Private_Type (Indx_Typ) then
+ if Is_Private_Type (Indx_Typ) then
Indx_Typ := Full_View (Indx_Typ);
end if;