mirror of git://gcc.gnu.org/git/gcc.git
[multiple changes]
2012-03-09 Robert Dewar <dewar@adacore.com> * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb, a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb, a-stzsup.ads: Minor reformatting. 2012-03-09 Thomas Quinot <quinot@adacore.com> * s-ransee-vms.adb: Minor reformatting. 2012-03-09 Arnaud Charlet <charlet@adacore.com> * comperr.adb (Delete_SCIL_Files): Fix handling of N_Package_Renaming_Declaration and N_Generic_Package_Declaration. From-SVN: r185141
This commit is contained in:
parent
ea3a4ad0a3
commit
a1fc903a3f
|
@ -1,3 +1,18 @@
|
||||||
|
2012-03-09 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
|
||||||
|
a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
|
||||||
|
a-stzsup.ads: Minor reformatting.
|
||||||
|
|
||||||
|
2012-03-09 Thomas Quinot <quinot@adacore.com>
|
||||||
|
|
||||||
|
* s-ransee-vms.adb: Minor reformatting.
|
||||||
|
|
||||||
|
2012-03-09 Arnaud Charlet <charlet@adacore.com>
|
||||||
|
|
||||||
|
* comperr.adb (Delete_SCIL_Files): Fix handling of
|
||||||
|
N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
|
||||||
|
|
||||||
2012-03-09 Javier Miranda <miranda@adacore.com>
|
2012-03-09 Javier Miranda <miranda@adacore.com>
|
||||||
|
|
||||||
* sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
|
* sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
|
||||||
|
|
|
@ -41,16 +41,17 @@ with Ada.Strings.Maps;
|
||||||
package Ada.Strings.Superbounded is
|
package Ada.Strings.Superbounded is
|
||||||
pragma Preelaborate;
|
pragma Preelaborate;
|
||||||
|
|
||||||
|
-- Type Bounded_String in Ada.Strings.Bounded.Generic_Bounded_Length is
|
||||||
|
-- derived from Super_String, with the constraint of the maximum length.
|
||||||
|
|
||||||
type Super_String (Max_Length : Positive) is record
|
type Super_String (Max_Length : Positive) is record
|
||||||
Current_Length : Natural := 0;
|
Current_Length : Natural := 0;
|
||||||
Data : String (1 .. Max_Length);
|
Data : String (1 .. Max_Length);
|
||||||
-- A previous version had a default initial value for Data, which is no
|
-- A previous version had a default initial value for Data, which is
|
||||||
-- longer necessary, because we now special-case this type in the
|
-- no longer necessary, because we now special-case this type in the
|
||||||
-- compiler, so "=" composes properly for descendants of this
|
-- compiler, so "=" composes properly for descendants of this type.
|
||||||
-- type. Leaving it out is more efficient.
|
-- Leaving it out is more efficient.
|
||||||
end record;
|
end record;
|
||||||
-- Type Bounded_String in Ada.Strings.Bounded.Generic_Bounded_Length is
|
|
||||||
-- derived from this type, with the constraint of the maximum length.
|
|
||||||
|
|
||||||
-- The subprograms defined for Super_String are similar to those
|
-- The subprograms defined for Super_String are similar to those
|
||||||
-- defined for Bounded_String, except that they have different names, so
|
-- defined for Bounded_String, except that they have different names, so
|
||||||
|
|
|
@ -44,16 +44,17 @@ package Ada.Strings.Wide_Superbounded is
|
||||||
|
|
||||||
Wide_NUL : constant Wide_Character := Wide_Character'Val (0);
|
Wide_NUL : constant Wide_Character := Wide_Character'Val (0);
|
||||||
|
|
||||||
|
-- Ada.Strings.Wide_Bounded.Generic_Bounded_Length.Wide_Bounded_String is
|
||||||
|
-- derived from Super_String, with the constraint of the maximum length.
|
||||||
|
|
||||||
type Super_String (Max_Length : Positive) is record
|
type Super_String (Max_Length : Positive) is record
|
||||||
Current_Length : Natural := 0;
|
Current_Length : Natural := 0;
|
||||||
Data : Wide_String (1 .. Max_Length);
|
Data : Wide_String (1 .. Max_Length);
|
||||||
-- A previous version had a default initial value for Data, which is no
|
-- A previous version had a default initial value for Data, which is
|
||||||
-- longer necessary, because we now special-case this type in the
|
-- no longer necessary, because we now special-case this type in the
|
||||||
-- compiler, so "=" composes properly for descendants of this
|
-- compiler, so "=" composes properly for descendants of this type.
|
||||||
-- type. Leaving it out is more efficient.
|
-- Leaving it out is more efficient.
|
||||||
end record;
|
end record;
|
||||||
-- Ada.Strings.Wide_Bounded.Generic_Bounded_Length.Wide_Bounded_String is
|
|
||||||
-- derived from this type, with the constraint of the maximum length.
|
|
||||||
|
|
||||||
-- The subprograms defined for Super_String are similar to those defined
|
-- The subprograms defined for Super_String are similar to those defined
|
||||||
-- for Bounded_Wide_String, except that they have different names, so that
|
-- for Bounded_Wide_String, except that they have different names, so that
|
||||||
|
|
|
@ -45,16 +45,17 @@ package Ada.Strings.Wide_Wide_Superbounded is
|
||||||
Wide_Wide_NUL : constant Wide_Wide_Character :=
|
Wide_Wide_NUL : constant Wide_Wide_Character :=
|
||||||
Wide_Wide_Character'Val (0);
|
Wide_Wide_Character'Val (0);
|
||||||
|
|
||||||
|
-- Wide_Wide_Bounded.Generic_Bounded_Length.Wide_Wide_Bounded_String is
|
||||||
|
-- derived from Super_String, with the constraint of the maximum length.
|
||||||
|
|
||||||
type Super_String (Max_Length : Positive) is record
|
type Super_String (Max_Length : Positive) is record
|
||||||
Current_Length : Natural := 0;
|
Current_Length : Natural := 0;
|
||||||
Data : Wide_Wide_String (1 .. Max_Length);
|
Data : Wide_Wide_String (1 .. Max_Length);
|
||||||
-- A previous version had a default initial value for Data, which is no
|
-- A previous version had a default initial value for Data, which is
|
||||||
-- longer necessary, because we now special-case this type in the
|
-- no longer necessary, because we now special-case this type in the
|
||||||
-- compiler, so "=" composes properly for descendants of this
|
-- compiler, so "=" composes properly for descendants of this type.
|
||||||
-- type. Leaving it out is more efficient.
|
-- Leaving it out is more efficient.
|
||||||
end record;
|
end record;
|
||||||
-- Wide_Wide_Bounded.Generic_Bounded_Length.Wide_Wide_Bounded_String is
|
|
||||||
-- derived from this type, with the constraint of the maximum length.
|
|
||||||
|
|
||||||
-- The subprograms defined for Super_String are similar to those defined
|
-- The subprograms defined for Super_String are similar to those defined
|
||||||
-- for Bounded_Wide_Wide_String, except that they have different names, so
|
-- for Bounded_Wide_Wide_String, except that they have different names, so
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
|
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
@ -477,7 +477,7 @@ package body Comperr is
|
||||||
Name_Len := K;
|
Name_Len := K;
|
||||||
end Decode_Name_Buffer;
|
end Decode_Name_Buffer;
|
||||||
|
|
||||||
-- Start of processing for Decode_Name_Buffer
|
-- Start of processing for Delete_SCIL_Files
|
||||||
|
|
||||||
begin
|
begin
|
||||||
-- If parsing was not successful, no Main_Unit is available, so return
|
-- If parsing was not successful, no Main_Unit is available, so return
|
||||||
|
@ -499,6 +499,13 @@ package body Comperr is
|
||||||
when N_Package_Body =>
|
when N_Package_Body =>
|
||||||
Unit_Name := Corresponding_Spec (Main);
|
Unit_Name := Corresponding_Spec (Main);
|
||||||
|
|
||||||
|
when N_Package_Renaming_Declaration =>
|
||||||
|
Unit_Name := Defining_Unit_Name (Main);
|
||||||
|
|
||||||
|
when N_Generic_Package_Declaration =>
|
||||||
|
-- No SCIL file generated for generic package declarations
|
||||||
|
return;
|
||||||
|
|
||||||
-- Should never happen, but can be ignored in production
|
-- Should never happen, but can be ignored in production
|
||||||
|
|
||||||
when others =>
|
when others =>
|
||||||
|
|
|
@ -6116,8 +6116,7 @@ package body Exp_Ch3 is
|
||||||
-- This is done unconditionally to ensure that tools can be linked
|
-- This is done unconditionally to ensure that tools can be linked
|
||||||
-- properly with user programs compiled with older language versions.
|
-- properly with user programs compiled with older language versions.
|
||||||
-- In addition, this is needed because "=" composes for bounded strings
|
-- In addition, this is needed because "=" composes for bounded strings
|
||||||
-- in all language versions (see also
|
-- in all language versions (see Exp_Ch4.Expand_Composite_Equality).
|
||||||
-- Exp_Ch4.Expand_Composite_Equality).
|
|
||||||
|
|
||||||
elsif Comes_From_Source (Def_Id)
|
elsif Comes_From_Source (Def_Id)
|
||||||
and then Convention (Def_Id) = Convention_Ada
|
and then Convention (Def_Id) = Convention_Ada
|
||||||
|
|
|
@ -2504,12 +2504,12 @@ package body Exp_Ch4 is
|
||||||
Op : constant Node_Id := Find_Primitive_Eq;
|
Op : constant Node_Id := Find_Primitive_Eq;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
-- Use user-defined primitive if it exists, otherwise use
|
||||||
|
-- predefined equality.
|
||||||
|
|
||||||
if Present (Op) then
|
if Present (Op) then
|
||||||
return Op;
|
return Op;
|
||||||
else
|
else
|
||||||
|
|
||||||
-- Use predefined equality if no user-defined primitive exists
|
|
||||||
|
|
||||||
return Make_Op_Eq (Loc, Lhs, Rhs);
|
return Make_Op_Eq (Loc, Lhs, Rhs);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -258,7 +258,8 @@ package System.OS_Interface is
|
||||||
PR_SET_NAME : constant := 15;
|
PR_SET_NAME : constant := 15;
|
||||||
|
|
||||||
function prctl
|
function prctl
|
||||||
(option : int; arg2, arg3, arg4, arg5 : unsigned_long := 0) return int;
|
(option : int;
|
||||||
|
arg2, arg3, arg4, arg5 : unsigned_long := 0) return int;
|
||||||
pragma Import (C, prctl);
|
pragma Import (C, prctl);
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Version used on OpenVMS systems, where Clock accuracy is too low for
|
-- Version used on OpenVMS systems, where Clock accuracy is too low for
|
||||||
-- RM A.5.2 (45).
|
-- RM A.5.2(45).
|
||||||
|
|
||||||
with Interfaces; use Interfaces;
|
with Interfaces; use Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -771,6 +771,7 @@ package body System.Task_Primitives.Operations is
|
||||||
declare
|
declare
|
||||||
Task_Name : String (1 .. Parameters.Max_Task_Image_Length + 1);
|
Task_Name : String (1 .. Parameters.Max_Task_Image_Length + 1);
|
||||||
Result : int;
|
Result : int;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
-- Set thread name to ease debugging
|
-- Set thread name to ease debugging
|
||||||
|
|
||||||
|
|
|
@ -4888,10 +4888,12 @@ package body Sem_Ch6 is
|
||||||
Remove (Body_To_Analyze);
|
Remove (Body_To_Analyze);
|
||||||
|
|
||||||
-- Keep separate checks needed when compiling without optimizations
|
-- Keep separate checks needed when compiling without optimizations
|
||||||
-- AAMP and VM targets have no support for inlining in the backend
|
|
||||||
-- and hence we use frontend inlining at all optimization levels.
|
|
||||||
|
|
||||||
if Optimization_Level = 0
|
if Optimization_Level = 0
|
||||||
|
|
||||||
|
-- AAMP and VM targets have no support for inlining in the backend
|
||||||
|
-- and hence we use frontend inlining at all optimization levels.
|
||||||
|
|
||||||
or else AAMP_On_Target
|
or else AAMP_On_Target
|
||||||
or else VM_Target /= No_VM
|
or else VM_Target /= No_VM
|
||||||
then
|
then
|
||||||
|
|
|
@ -6751,18 +6751,18 @@ package body Sem_Util is
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
function Is_Bounded_String (T : Entity_Id) return Boolean is
|
function Is_Bounded_String (T : Entity_Id) return Boolean is
|
||||||
-- Check whether T is ultimately derived from Ada.Strings.-
|
|
||||||
-- Superbounded.Super_String, or one of the [Wide_]Wide_
|
|
||||||
-- versions. This will be True for all the Bounded_String types in
|
|
||||||
-- instances of the Generic_Bounded_Length generics, and for types
|
|
||||||
-- derived from those.
|
|
||||||
|
|
||||||
Under : constant Entity_Id := Underlying_Type (Root_Type (T));
|
Under : constant Entity_Id := Underlying_Type (Root_Type (T));
|
||||||
|
|
||||||
begin
|
begin
|
||||||
return Present (Under) and then
|
-- Check whether T is ultimately derived from Ada.Strings.Superbounded.
|
||||||
(Is_RTE (Root_Type (Under), RO_SU_Super_String)
|
-- Super_String, or one of the [Wide_]Wide_ versions. This will
|
||||||
or else Is_RTE (Root_Type (Under), RO_WI_Super_String)
|
-- be True for all the Bounded_String types in instances of the
|
||||||
or else Is_RTE (Root_Type (Under), RO_WW_Super_String));
|
-- Generic_Bounded_Length generics, and for types derived from those.
|
||||||
|
|
||||||
|
return Present (Under)
|
||||||
|
and then (Is_RTE (Root_Type (Under), RO_SU_Super_String) or else
|
||||||
|
Is_RTE (Root_Type (Under), RO_WI_Super_String) or else
|
||||||
|
Is_RTE (Root_Type (Under), RO_WW_Super_String));
|
||||||
end Is_Bounded_String;
|
end Is_Bounded_String;
|
||||||
|
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
@ -9422,13 +9422,14 @@ package body Sem_Util is
|
||||||
|
|
||||||
function Must_Inline (Subp : Entity_Id) return Boolean is
|
function Must_Inline (Subp : Entity_Id) return Boolean is
|
||||||
begin
|
begin
|
||||||
-- AAMP and VM targets have no support for inlining in the backend.
|
|
||||||
-- Hence we do as much inlining as possible in the front end.
|
|
||||||
|
|
||||||
return
|
return
|
||||||
(Optimization_Level = 0
|
(Optimization_Level = 0
|
||||||
or else AAMP_On_Target
|
|
||||||
or else VM_Target /= No_VM)
|
-- AAMP and VM targets have no support for inlining in the backend.
|
||||||
|
-- Hence we do as much inlining as possible in the front end.
|
||||||
|
|
||||||
|
or else AAMP_On_Target
|
||||||
|
or else VM_Target /= No_VM)
|
||||||
and then Has_Pragma_Inline (Subp)
|
and then Has_Pragma_Inline (Subp)
|
||||||
and then (Has_Pragma_Inline_Always (Subp) or else Front_End_Inlining);
|
and then (Has_Pragma_Inline_Always (Subp) or else Front_End_Inlining);
|
||||||
end Must_Inline;
|
end Must_Inline;
|
||||||
|
|
Loading…
Reference in New Issue