]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2017-09-06 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Sep 2017 10:04:20 +0000 (10:04 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Sep 2017 10:04:20 +0000 (10:04 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251766 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/freeze.adb

index 5c0b3d7a25af27d9dc069ac6c51449472b31d449..196edaec3e47a7f31090df90ae17c2822f9e2b21 100644 (file)
@@ -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.
index 4d8aa656a57a43e16d781968c51d0c7a97637cbd..5540c78fecfd2c7156d968046cc76583d0278e5a 100644 (file)
@@ -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