re PR c++/60994 (gcc does not recognize hidden/shadowed enumeration as valid nested...
authorJakub Jelinek <jakub@redhat.com>
Mon, 19 Nov 2018 14:01:56 +0000 (15:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 19 Nov 2018 14:01:56 +0000 (15:01 +0100)
PR c++/60994
* g++.dg/lookup/pr60994.C: New test.

From-SVN: r266275

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/pr60994.C [new file with mode: 0644]

index 30fbd325f4963b36b218f35ac6453de9096c4d90..51196ba86259588b608eb99775bfd282e7306d7c 100644 (file)
@@ -1,5 +1,8 @@
 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
 
+       PR c++/60994
+       * g++.dg/lookup/pr60994.C: New test.
+
        PR debug/87039
        * g++.dg/gomp/pr78363-4.C: New test.
        * g++.dg/gomp/pr78363-5.C: New test.
diff --git a/gcc/testsuite/g++.dg/lookup/pr60994.C b/gcc/testsuite/g++.dg/lookup/pr60994.C
new file mode 100644 (file)
index 0000000..c6bd107
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/60994
+// { dg-do compile }
+
+struct s
+{
+  static int i;
+};
+
+template <typename T>
+int s()
+{
+  return s::i; // { dg-bogus "is not a class" }
+}