aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-10-21 10:30:24 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-21 12:30:24 +0200
commitfd0ff1cf7e35b91797be21997ab3d75f3b980873 (patch)
tree82e1e9c9a50526d9512c41952beb3d596c952bb7 /gcc/ada/exp_ch4.adb
parent04cbd48e9ed3fbd4c66f7ebc829276b5b83932a5 (diff)
downloadgcc-fd0ff1cf7e35b91797be21997ab3d75f3b980873.zip
gcc-fd0ff1cf7e35b91797be21997ab3d75f3b980873.tar.gz
gcc-fd0ff1cf7e35b91797be21997ab3d75f3b980873.tar.bz2
einfo.ads, einfo.adb: Add handling of predicates.
2010-10-21 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb: Add handling of predicates. Rework handling of invariants. * exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to handing of invariants. * par-prag.adb: Add dummy entry for pragma Predicate * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for Predicate aspects. * sem_prag.adb: Add implementation of pragma Predicate. * snames.ads-tmpl: Add entries for pragma Predicate. 2010-10-21 Robert Dewar <dewar@adacore.com> * elists.adb: Minor reformatting. From-SVN: r165763
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 361d854..d62703d 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -8278,7 +8278,8 @@ package body Exp_Ch4 is
-- Note: the Comes_From_Source check, and then the resetting of this
-- flag prevents what would otherwise be an infinite recursion.
- if Present (Invariant_Procedure (Target_Type))
+ if Has_Invariants (Target_Type)
+ and then Present (Invariant_Procedure (Target_Type))
and then Comes_From_Source (N)
then
Set_Comes_From_Source (N, False);