aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-14 09:51:39 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-14 09:51:39 +0000
commit2a127979d92caafe31a2c9be5d9f5bb70e1f4d98 (patch)
tree5123dc681526f854a38f8fd7859fcf521025e66c /gcc/ada
parent16b9e3c32d0c52334644021e5e0465b1c43d190e (diff)
downloadgcc-2a127979d92caafe31a2c9be5d9f5bb70e1f4d98.zip
gcc-2a127979d92caafe31a2c9be5d9f5bb70e1f4d98.tar.gz
gcc-2a127979d92caafe31a2c9be5d9f5bb70e1f4d98.tar.bz2
[Ada] Fix internal error on inlined subprogram instance
This fixes a long-standing oddity in the procedure analyzing the instantiation of a generic subprogram, which would set the Is_Generic_Instance flag on the enclosing package generated for the instantiation but only to reset it a few lines below. Now this flag is relied upon by the machinery which computes the set of public entities to be exposed by a package. 2019-08-14 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset the Is_Generic_Instance flag previously set on the package generated for the instantiation of a generic subprogram. gcc/testsuite/ * gnat.dg/generic_inst11.adb, gnat.dg/generic_inst11_pkg.adb, gnat.dg/generic_inst11_pkg.ads: New testcase. From-SVN: r274457
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/sem_ch12.adb4
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 99b551f..a36a83a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
+ the Is_Generic_Instance flag previously set on the package
+ generated for the instantiation of a generic subprogram.
+
2019-08-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index f98f2fa..5f290ac 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -5264,10 +5264,6 @@ package body Sem_Ch12 is
Analyze (Pack_Decl);
Check_Formal_Packages (Pack_Id);
- Set_Is_Generic_Instance (Pack_Id, False);
-
- -- Why do we clear Is_Generic_Instance??? We set it 20 lines
- -- above???
-- Body of the enclosing package is supplied when instantiating the
-- subprogram body, after semantic analysis is completed.