This patch fixes a compiler abort on a generic unit to which the aspect No_Return applies.
Tested in ACATS 4.1D C651002. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-06 Ed Schonberg <schonb...@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.
Index: freeze.adb =================================================================== --- freeze.adb (revision 251765) +++ freeze.adb (working copy) @@ -5489,6 +5489,13 @@ 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