summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 12:16:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 12:16:37 +0000
commit7e2d3667c4bd5eb0d804839bfc861a71a8f66b03 (patch)
tree70c80e943418727dc684792adea3258f85c4189d /gcc/ada/sem_ch13.adb
parentd4e1acfa0dc9d27730366725df3e1319d2042958 (diff)
downloadgcc-7e2d3667c4bd5eb0d804839bfc861a71a8f66b03.tar.gz
2015-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect, case Aspect_Disable_Controlled): If expander is not active, pre-analyze expression anyway for ASIS and other tools use. * sem_prag.adb (Build_Generic_Class_Condition): Handle properly anonymous access types in parameter specifications. Make the formal type a formal derived type of the controlling type of the subprogram. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 7b5e1b84a15..f3fd5f42154 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -3273,7 +3273,8 @@ package body Sem_Ch13 is
-- to disable controlled types, because typical usage is
-- "Disable_Controlled => not <some_check>'Enabled", and
-- the value of Enabled is not known until we see a
- -- particular instance.
+ -- particular instance. In such a context, we just need
+ -- to preanalyze the expression for legality.
if Expander_Active then
Analyze_And_Resolve (Expr, Standard_Boolean);
@@ -3283,6 +3284,9 @@ package body Sem_Ch13 is
then
Set_Disable_Controlled (E);
end if;
+
+ elsif Serious_Errors_Detected = 0 then
+ Preanalyze_And_Resolve (Expr, Standard_Boolean);
end if;
goto Continue;