* alias.c (get_alias_set): Add cut-off for recursion.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 10 Dec 2015 12:12:59 +0000 (12:12 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 10 Dec 2015 12:12:59 +0000 (12:12 +0000)
From-SVN: r231505

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/specs/access1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/access2.ads [new file with mode: 0644]

index aca8e944477bff7c8f9de2e98a1eff13cb19f98d..e68d68876790cf1a4718c2da683d9936802a5448 100644 (file)
@@ -88,6 +88,7 @@
        (nonoverlapping_component_refs_of_decl_p): Update sanity check.
        (decl_refs_may_alias_p): Use compare_base_decls.
        * alias.c: Include cgraph.h
+       (get_alias_set): Add cut-off for recursion.
        (rtx_equal_for_memref_p): Use rtx_equal_for_memref_p.
        (compare_base_decls): New function.
        (base_alias_check): Likewise.
index 3706aaed090d645a199775294199548837c3519b..131596c06997c5c6d7b5607c7eec54eeb7877bed 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-10  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gnat.dg/specs/access1.ads: New test.
+       * gnat.dg/specs/access2.ads: Likewise.
+
 2015-12-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/68785
diff --git a/gcc/testsuite/gnat.dg/specs/access1.ads b/gcc/testsuite/gnat.dg/specs/access1.ads
new file mode 100644 (file)
index 0000000..2464e48
--- /dev/null
@@ -0,0 +1,9 @@
+--  { dg-do compile }
+
+package Access1 is
+
+   type R;
+   type S is access R;
+   type R is new S;
+
+end Access1;
diff --git a/gcc/testsuite/gnat.dg/specs/access2.ads b/gcc/testsuite/gnat.dg/specs/access2.ads
new file mode 100644 (file)
index 0000000..ff0046f
--- /dev/null
@@ -0,0 +1,10 @@
+--  { dg-do compile }
+
+package Access2 is
+
+    type Priv;
+    type Inc is access Priv;
+    type Priv is access Inc;
+    C : constant Priv := new Inc;
+
+end Access2;