aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-19 10:21:37 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-19 10:21:37 +0200
commit99ba07a3b0337454acc00e0a0bcf57ec9df73e80 (patch)
tree77741937fcacc762f9c11b5287338ae96d11b444
parent96b25c42a67dbfe1df14abb224e3f6f040ca961c (diff)
downloadgcc-99ba07a3b0337454acc00e0a0bcf57ec9df73e80.zip
gcc-99ba07a3b0337454acc00e0a0bcf57ec9df73e80.tar.gz
gcc-99ba07a3b0337454acc00e0a0bcf57ec9df73e80.tar.bz2
[multiple changes]
2011-09-19 Robert Dewar <dewar@adacore.com> * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb, exp_aggr.adb: Minor reformatting. 2011-09-19 Yannick Moy <moy@adacore.com> * lib-xref.adb (Generate_Reference): Change entity referenced to underlying object if any, or else reference to the HEAP. From-SVN: r178956
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/exp_aggr.adb3
-rw-r--r--gcc/ada/lib-writ.ads2
-rw-r--r--gcc/ada/lib-xref.adb27
-rw-r--r--gcc/ada/s-restri.ads7
-rw-r--r--gcc/ada/sem_aggr.adb4
-rw-r--r--gcc/ada/sem_ch6.adb5
7 files changed, 49 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3634ebc..c4d2dcc 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2011-09-19 Robert Dewar <dewar@adacore.com>
+
+ * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
+ exp_aggr.adb: Minor reformatting.
+
+2011-09-19 Yannick Moy <moy@adacore.com>
+
+ * lib-xref.adb (Generate_Reference): Change entity referenced
+ to underlying object if any, or else reference to the HEAP.
+
2011-09-15 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Make-lang.in: Update dependencies.
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 2dd052e..82b7318 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -4705,7 +4705,6 @@ package body Exp_Aggr is
and then Static_Elaboration_Desired (Current_Scope)
then
Convert_To_Positional (N, Max_Others_Replicate => 100);
-
else
Convert_To_Positional (N);
end if;
@@ -5971,7 +5970,7 @@ package body Exp_Aggr is
if Present (Component_Associations (N)) then
Convert_To_Positional
- (N, Max_Others_Replicate => 64, Handle_Bit_Packed => True);
+ (N, Max_Others_Replicate => 64, Handle_Bit_Packed => True);
return Nkind (N) /= N_Aggregate;
end if;
diff --git a/gcc/ada/lib-writ.ads b/gcc/ada/lib-writ.ads
index f6cf75f..d7bea5e 100644
--- a/gcc/ada/lib-writ.ads
+++ b/gcc/ada/lib-writ.ads
@@ -350,7 +350,7 @@ package Lib.Writ is
-- Subsequent R lines are present only if pragma Restriction No_Dependence
-- is used. There is one such line for each such pragma appearing in the
- -- extended main unit. The format is
+ -- extended main unit. The format is:
-- R unit_name
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index f16e8ab..e9de179 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -951,6 +951,33 @@ package body Lib.Xref is
return;
end if;
+ -- In Alfa mode, consider the underlying entity renamed instead of
+ -- the renaming, which is needed to compute a valid set of effects
+ -- (reads, writes) for the enclosing subprogram.
+
+ if Alfa_Mode
+ and then Is_Object (Ent)
+ and then Present (Renamed_Object (Ent))
+ then
+ Ent := Get_Enclosing_Object (Renamed_Object (Ent));
+
+ -- If no enclosing object, then it could be a reference to any
+ -- location not tracked individually, like heap-allocated data.
+ -- Conservatively approximate this possibility by generating a
+ -- dereference, and return.
+
+ if No (Ent) then
+ if Actual_Typ = 'w' then
+ Alfa.Generate_Dereference (Nod, 'r');
+ Alfa.Generate_Dereference (Nod, 'w');
+ else
+ Alfa.Generate_Dereference (Nod, 'r');
+ end if;
+
+ return;
+ end if;
+ end if;
+
-- Record reference to entity
Ref := Original_Location (Sloc (Nod));
diff --git a/gcc/ada/s-restri.ads b/gcc/ada/s-restri.ads
index cd447c1..0085548 100644
--- a/gcc/ada/s-restri.ads
+++ b/gcc/ada/s-restri.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2011, 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- --
@@ -49,7 +49,10 @@ package System.Restrictions is
package Rident is new System.Rident;
Run_Time_Restrictions : Rident.Restrictions_Info;
- -- Restrictions as set by the user, or detected by the binder.
+ -- Restrictions as set by the user, or detected by the binder. See details
+ -- in package System.Rident for what restrictions are included in the list
+ -- and the format of the information.
+ --
-- Note that a restriction which is both Set and Violated at run-time means
-- that the violation was detected as part of the Ada run-time and not
-- as part of user code.
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 4af133c..657ece3 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -745,8 +745,8 @@ package body Sem_Aggr is
begin
-- All the components of List are matched against Component and a count
- -- is maintained of possible misspellings. When at the end of the
- -- the analysis there are one or two (not more!) possible misspellings,
+ -- is maintained of possible misspellings. When at the end of the the
+ -- analysis there are one or two (not more!) possible misspellings,
-- these misspellings will be suggested as possible correction.
Component_Elmt := First_Elmt (Elements);
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 6740dd6..fd87387 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -326,8 +326,9 @@ package body Sem_Ch6 is
Make_Subprogram_Declaration (Loc,
Specification => Copy_Separate_Tree (Specification (N)));
- -- Do rewrite setting Comes_From_Source on the result if the original
- -- expression function came from source.
+ -- Do rewrite propagating the information that an expression function
+ -- comes from source (otherwise references to this entity are not
+ -- stored).
Rewrite (N, New_Decl);
Set_Comes_From_Source