From: Ed Schonberg Date: Wed, 6 Sep 2017 10:04:20 +0000 (+0000) Subject: freeze.adb (Freeze_Entity): Do not generate a freeze node for a generic unit... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e69995410d3462cca8846369620b2e438996138;p=gcc.git freeze.adb (Freeze_Entity): Do not generate a freeze node for a generic unit... 2017-09-06 Ed Schonberg * 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5c0b3d7a25a..196edaec3e4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2017-09-06 Ed Schonberg + + * 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 * treepr.adb (Print_Entity_Info): Do not print empty Elist. diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 4d8aa656a57..5540c78fecf 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