aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-08-06 09:51:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-08-06 09:51:56 +0200
commitf2c992d90657ab72fd3edcf0e99a1d615edfacde (patch)
treed291c113a8fc760226d95d8f4abb9bcb435b7a39 /gcc/ada/sem_attr.adb
parenta01da44af3b5bfe3426833961c2126448b576cb1 (diff)
downloadgcc-f2c992d90657ab72fd3edcf0e99a1d615edfacde.zip
gcc-f2c992d90657ab72fd3edcf0e99a1d615edfacde.tar.gz
gcc-f2c992d90657ab72fd3edcf0e99a1d615edfacde.tar.bz2
[multiple changes]
2012-08-06 Robert Dewar <dewar@adacore.com> * aspects.ads: Define Aspect_Id_Exclude_No_Aspect. * par-ch13.adb, restrict.adb: Use Aspect_Id_Exclude_No_Aspect to simplify code. 2012-08-06 Yannick Moy <moy@adacore.com> * gnat-style.texi: Update style guide for declarations. 2012-08-06 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute): In the case for 'Old, skip a special expansion which is not needed in Alfa mode. 2012-08-06 Yannick Moy <moy@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): Do not perform an expansion of the iterator in Alfa mode. From-SVN: r190159
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 782cd98..35adaaf 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4034,7 +4034,13 @@ package body Sem_Attr is
-- enclosing subprogram. This is properly an expansion activity
-- but it has to be performed now to prevent out-of-order issues.
- if not Is_Entity_Name (P) then
+ -- This expansion is both harmful and not needed in Alfa mode, since
+ -- the formal verification backend relies on the types of nodes
+ -- (hence is not robust w.r.t. a change to base type here), and does
+ -- not suffer from the out-of-order issue described above. Thus, this
+ -- expansion is skipped in Alfa mode.
+
+ if not Is_Entity_Name (P) and then not Alfa_Mode then
P_Type := Base_Type (P_Type);
Set_Etype (N, P_Type);
Set_Etype (P, P_Type);