From 895500a2aefb586b3ad34e0dc44563dbb4cb54fb Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Tue, 29 May 2018 09:41:52 +0000 Subject: [PATCH] [Ada] Set scope of component of subtype 2018-05-29 Ed Schonberg gcc/ada/ * sem_ch3.adb: Set scope of component of subtype. From-SVN: r260880 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/sem_ch3.adb | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4eb12c5fa87..fe5b58b1b0e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-05-29 Ed Schonberg + + * sem_ch3.adb: Set scope of component of subtype. + 2018-05-29 Ed Schonberg * exp_unst.adb (Visit_Node): Exclude selected components whose prefix diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 13162e00ab4..b8d250c4977 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -14630,9 +14630,12 @@ package body Sem_Ch3 is Set_Comes_From_Source (New_Compon, False); -- But it is a real entity, and a birth certificate must be properly - -- registered by entering it into the entity list. + -- registered by entering it into the entity list, and setting its + -- scope to the given subtype. This turns out to be useful for the + -- LLVM code generator, but that scope is not used otherwise. Enter_Name (New_Compon); + Set_Scope (New_Compon, Subt); return New_Compon; end Create_Component; -- 2.30.2