aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2017-09-06 10:04:20 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 12:04:20 +0200
commit3e69995410d3462cca8846369620b2e438996138 (patch)
tree7d15d0e25fe65ecc36fca60be38901d98eccf1f0 /gcc
parent9fb1e654f463fe3e30dccee2b6622c95edcf5d25 (diff)
downloadgcc-3e69995410d3462cca8846369620b2e438996138.zip
gcc-3e69995410d3462cca8846369620b2e438996138.tar.gz
gcc-3e69995410d3462cca8846369620b2e438996138.tar.bz2
freeze.adb (Freeze_Entity): Do not generate a freeze node for a generic unit...
2017-09-06 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Do not generate a freeze node for a generic unit, even if it includes delayed aspect specifications. Freeze nodes for generic entities must never appear in the tree that reaches the back-end of the compiler. From-SVN: r251766
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/freeze.adb7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5c0b3d7..196edae 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2017-09-06 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Freeze_Entity): Do not generate a freeze
+ node for a generic unit, even if it includes delayed aspect
+ specifications. Freeze nodes for generic entities must never
+ appear in the tree that reaches the back-end of the compiler.
+
2017-09-06 Yannick Moy <moy@adacore.com>
* treepr.adb (Print_Entity_Info): Do not print empty Elist.
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 4d8aa65..5540c78 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -5489,6 +5489,13 @@ package body Freeze is
then
Explode_Initialization_Compound_Statement (E);
end if;
+
+ -- Do not generate a freeze node for a generic unit.
+
+ if Is_Generic_Unit (E) then
+ Result := No_List;
+ goto Leave;
+ end if;
end if;
-- Case of a type or subtype being frozen