From e11b776b63c214d3e0792fa49ca2153df64d11d9 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 6 Jan 2017 12:06:24 +0100 Subject: [multiple changes] 2017-01-06 Ed Schonberg * 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 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate max_queue_lengths_array if unused. 2017-01-06 Bob Duff * 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 * 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 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and code cleanup. From-SVN: r244133 --- gcc/ada/sem_ch4.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_ch4.adb') 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; -- cgit v1.1