aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2015-11-12 11:12:23 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-11-12 12:12:23 +0100
commitd6dffa6695731c28a5a1e6d64c897680f761496c (patch)
tree9e351bc6156ff6bcc9756abc570ebfcbe3248371 /gcc/ada
parent73f05f9fe869c25fdcaf27f987016736322ca972 (diff)
downloadgcc-d6dffa6695731c28a5a1e6d64c897680f761496c.zip
gcc-d6dffa6695731c28a5a1e6d64c897680f761496c.tar.gz
gcc-d6dffa6695731c28a5a1e6d64c897680f761496c.tar.bz2
exp_attr.adb, [...]: Minor reformatting.
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor reformatting. From-SVN: r230235
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_attr.adb19
-rw-r--r--gcc/ada/freeze.adb13
-rw-r--r--gcc/ada/sem_ch13.adb8
-rw-r--r--gcc/ada/sem_util.adb1
5 files changed, 26 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9a799de..bb2fad1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
+ reformatting.
+
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index aaa3c72..8c02247 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -634,11 +634,10 @@ package body Exp_Attr is
Arr : Entity_Id;
Check : Boolean)
is
- C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
- Curr : constant Entity_Id := Current_Scope;
-
- Install : Boolean := False;
- Scop : Entity_Id := Scope (Arr);
+ C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
+ Curr : constant Entity_Id := Current_Scope;
+ Install : Boolean := False;
+ Scop : Entity_Id := Scope (Arr);
begin
if Is_Hidden (Arr)
@@ -646,10 +645,10 @@ package body Exp_Attr is
and then Ekind (Scop) = E_Package
then
Install := True;
- else
- -- The component type may be private, in which case we install
- -- its full view to compile the subprogram.
+ else
+ -- The component type may be private, in which case we install its
+ -- full view to compile the subprogram.
Scop := Scope (C_Type);
@@ -665,9 +664,7 @@ package body Exp_Attr is
-- If we are within an instance body, then all visibility has been
-- established already and there is no need to install the package.
- if Install
- and then not In_Instance_Body
- then
+ if Install and then not In_Instance_Body then
Push_Scope (Scop);
Install_Visible_Declarations (Scop);
Install_Private_Declarations (Scop);
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 88e785c..7c56b1f 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -672,24 +672,25 @@ package body Freeze is
-- later for the variable if it is assigned.
if (Ekind (E) = E_Variable
- or else (Ekind (E) = E_Constant
- and then not Is_Imported (E)))
+ or else (Ekind (E) = E_Constant
+ and then not Is_Imported (E)))
and then Overlays_Constant (E)
and then Present (Init)
then
declare
O_Ent : Entity_Id;
Off : Boolean;
+
begin
Find_Overlaid_Entity (Addr, O_Ent, Off);
if Ekind (O_Ent) = E_Constant
and then Etype (O_Ent) = Typ
and then Present (Constant_Value (O_Ent))
- and then Compile_Time_Compare (
- Init,
- Constant_Value (O_Ent),
- Assume_Valid => True) = EQ
+ and then Compile_Time_Compare
+ (Init,
+ Constant_Value (O_Ent),
+ Assume_Valid => True) = EQ
then
Set_No_Initialization (Decl);
return;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 3d33e63..5c87364 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -4725,11 +4725,13 @@ package body Sem_Ch13 is
Find_Overlaid_Entity (N, O_Ent, Off);
if Present (O_Ent) then
+
-- If the object overlays a constant object, mark it so
if Is_Constant_Object (O_Ent) then
Set_Overlays_Constant (U_Ent);
end if;
+
else
-- If this is not an overlay, mark a variable as being
-- volatile to prevent unwanted optimizations. It's a
@@ -4744,9 +4746,9 @@ package body Sem_Ch13 is
end if;
end if;
- -- Overlaying controlled objects is erroneous.
- -- Emit warning but continue analysis because program is
- -- itself legal, and back-end must see address clause.
+ -- Overlaying controlled objects is erroneous. Emit warning
+ -- but continue analysis because program is itself legal,
+ -- and back-end must see address clause.
if Present (O_Ent)
and then (Has_Controlled_Component (Etype (O_Ent))
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 2422bb3..25ffa96 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -16267,6 +16267,7 @@ package body Sem_Util is
Addr : constant Node_Id := Address_Clause (Ent);
O_Ent : Entity_Id;
Off : Boolean;
+
begin
Find_Overlaid_Entity (Addr, O_Ent, Off);