aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-11 12:18:47 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-11 12:18:47 +0200
commit3a8e3f636ac1597af351f7907ab684959d41b226 (patch)
treecd52ccb62e4c9a9292e2d4d5c617cfbdf4bc122f /gcc/ada/sem_ch6.adb
parent0213fb4e3c39b3fcb889252ea358cf5775a541dd (diff)
downloadgcc-3a8e3f636ac1597af351f7907ab684959d41b226.zip
gcc-3a8e3f636ac1597af351f7907ab684959d41b226.tar.gz
gcc-3a8e3f636ac1597af351f7907ab684959d41b226.tar.bz2
[multiple changes]
2013-04-11 Johannes Kanig <kanig@adacore.com> * opt.ads New global boolean Frame_Condition_Mode to avoid referring to command line switch. * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G is present, and disable Code generation in that case. Disable ALI file generation when switch is *not* present. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): Perform the pre-analysis on a copy of the expression, to prevent downstream visbility issues involving operators and instantiations. From-SVN: r197758
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 7b31ff57..707ed45 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -444,7 +444,12 @@ package body Sem_Ch6 is
Insert_After (Last (Decls), New_Body);
Push_Scope (Id);
Install_Formals (Id);
- Preanalyze_Spec_Expression (Expression (Ret), Etype (Id));
+
+ -- Do a preanalysis of the expression on a separate copy, to
+ -- prevent visibility issues later with operators in instances.
+
+ Preanalyze_Spec_Expression
+ (New_Copy_Tree (Expression (Ret)), Etype (Id));
End_Scope;
end;
end if;