[Ada] Unnesting: fix handling of generic associations
authorEd Schonberg <schonberg@adacore.com>
Mon, 11 Jun 2018 09:17:40 +0000 (09:17 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 11 Jun 2018 09:17:40 +0000 (09:17 +0000)
2018-06-11  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_unst.adb (Visit_Node): Skip generic associations.

From-SVN: r261408

gcc/ada/ChangeLog
gcc/ada/exp_unst.adb

index 791942d377cf97b1c1c7c242c12060a2d050b62a..d0722f772d8512591f819dfab6f03f1ef8da2dce 100644 (file)
@@ -1,3 +1,7 @@
+2018-06-11  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_unst.adb (Visit_Node): Skip generic associations.
+
 2018-06-11  Arnaud Charlet  <charlet@adacore.com>
 
        * libgnat/memtrack.adb (fwrite): Remove second definition.
index 9ad43f497f1d40afa7d6b2cf5af921a81f261083..1cdb2a576f044deada1dcea965beffffbaf1be70 100644 (file)
@@ -825,6 +825,13 @@ package body Exp_Unst is
                      return Skip;
                   end if;
 
+               --  Generic associations are not analyzed: the actuals are
+               --  transferred to renaming qnd subtype declarations that
+               --  are the ones that must be examined.
+
+               when N_Generic_Association =>
+                  return Skip;
+
                --  Indexed references can be uplevel if the type isn't static
                --  and if the lower bound (or an inner bound for a multi-
                --  dimensional array) is uplevel.