aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:06:24 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:06:24 +0100
commite11b776b63c214d3e0792fa49ca2153df64d11d9 (patch)
treea248ffec6c718d983b67ac49dc29fbd18854a775 /gcc/ada/sem_ch4.adb
parent6eca51ce090586d67fe01897c848bb224142549f (diff)
downloadgcc-e11b776b63c214d3e0792fa49ca2153df64d11d9.zip
gcc-e11b776b63c214d3e0792fa49ca2153df64d11d9.tar.gz
gcc-e11b776b63c214d3e0792fa49ca2153df64d11d9.tar.bz2
[multiple changes]
2017-01-06 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an iterator specification with a serious syntactic error, transform construct into an infinite loop in order to continue analysis and prevent a compiler abort. 2017-01-06 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate max_queue_lengths_array if unused. 2017-01-06 Bob Duff <duff@adacore.com> * errout.adb (Set_Msg_Text): Protect against out-of-bounds array access, in case "\" is at the end of Text. * stylesw.adb (Set_Style_Check_Options): Don't include input characters in the error message template, because they could be control characters such as "\", which Errout will try to interpret. 2017-01-06 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations): For a private type examine the visible declarations that follow the partial view, not just the private declarations that follow the full view. 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and code cleanup. From-SVN: r244133
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 9060fb1..253a12d 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -7798,7 +7798,16 @@ package body Sem_Ch4 is
Ref := Empty;
Typ := Underlying_Type (Base_Type (Typ));
- Inspect_Primitives (Typ, Ref);
+ Inspect_Primitives (Typ, Ref);
+
+ -- Now look for explicit declarations of an indexing operation.
+ -- If the type is private the operation may be declared in the
+ -- visible part that contains the partial view.
+
+ if Is_Private_Type (T) then
+ Inspect_Declarations (T, Ref);
+ end if;
+
Inspect_Declarations (Typ, Ref);
return Ref;