aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-01-06 15:48:05 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-01-06 15:48:05 +0100
commit4913e24c20f58de96248db4bb8506c8b2678d799 (patch)
tree14b273463371d190969b1946bbd551ae4fc4f537 /gcc/ada/sem_ch4.adb
parent86d71fcabfba7a1f288ea6b90e7228705d6f5b99 (diff)
downloadgcc-4913e24c20f58de96248db4bb8506c8b2678d799.zip
gcc-4913e24c20f58de96248db4bb8506c8b2678d799.tar.gz
gcc-4913e24c20f58de96248db4bb8506c8b2678d799.tar.bz2
[multiple changes]
2012-01-06 Robert Dewar <dewar@adacore.com> * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads, s-utf_32.ads: Add pragma Pure * s-utf_32.adb: Suppress warnings on non-static constants (now that this is Pure). 2012-01-06 Bob Duff <duff@adacore.com> * s-rpc.ads (Read, Write): Add overriding indicators. 2012-01-06 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Add documentation for conventions Ada_Pass_By_Copy and Ada_Pass_By_Reference. 2012-01-06 Gary Dismukes <dismukes@adacore.com> * a-tienio.adb (Put): Add exception message on raise statements. Remove unneeded blocks and object declarations. 2012-01-06 Robert Dewar <dewar@adacore.com> * sem_prag.adb: Minor reformatting. 2012-01-06 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate that a selected component within a generic unit has been resolved as a prefixed call with local references. * sem_ch3.adb (Is_Visible_Component): In an instance body a selected component is always visible. * sem_ch4.adb (Analyze_Selected_Component): If the node is a prefixed call in an instance, do not look for visible components of the type. * sem_ch12.adb (Reset_Entity): If a selected component has resolved to a prefixed call, mark the node accordingly when prefix and selector are local references. From-SVN: r182954
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 99f2966..5ade3a8 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -3858,8 +3858,10 @@ package body Sem_Ch4 is
elsif Is_Record_Type (Prefix_Type) then
-- Find component with given name
+ -- In an instance, if the node is known as a prefixed call, do
+ -- not examine components whose visibility may be accidental.
- while Present (Comp) loop
+ while Present (Comp) and then not Is_Prefixed_Call (N) loop
if Chars (Comp) = Chars (Sel)
and then Is_Visible_Component (Comp)
then