aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-29 09:41:52 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-29 09:41:52 +0000
commit895500a2aefb586b3ad34e0dc44563dbb4cb54fb (patch)
treec8f7c10b6e6dabee332a03aa3c2a871df07d8a39 /gcc
parent14f8ba9ad1d587528208b9f759849333a19918d8 (diff)
downloadgcc-895500a2aefb586b3ad34e0dc44563dbb4cb54fb.zip
gcc-895500a2aefb586b3ad34e0dc44563dbb4cb54fb.tar.gz
gcc-895500a2aefb586b3ad34e0dc44563dbb4cb54fb.tar.bz2
[Ada] Set scope of component of subtype
2018-05-29 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch3.adb: Set scope of component of subtype. From-SVN: r260880
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/sem_ch3.adb5
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 4eb12c5..fe5b58b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,9 @@
2018-05-29 Ed Schonberg <schonberg@adacore.com>
+ * sem_ch3.adb: Set scope of component of subtype.
+
+2018-05-29 Ed Schonberg <schonberg@adacore.com>
+
* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
carry no type. Such selected components appear in unit names that are
child units, both in the specification and possibly in an end label for
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 13162e0..b8d250c 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;