re PR c++/65592 (internal compiler error: Segmentation fault when using non-existent...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 10 Jul 2015 09:33:34 +0000 (09:33 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 10 Jul 2015 09:33:34 +0000 (09:33 +0000)
2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65592
* g++.dg/cpp0x/scoped_enum6.C: New.

From-SVN: r225658

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

index 59e446c43cfef8f2981151bb3e33281833fa3bb0..eb59054b49a809bb090d12b298fb63a0f9d2003a 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/65592
+       * g++.dg/cpp0x/scoped_enum6.C: New.
+
 2015-07-10  Tom de Vries  <tom@codesourcery.com>
 
        * gfortran.dg/parloops-exit-first-loop-alt-2.f95: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum6.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum6.C
new file mode 100644 (file)
index 0000000..34a56b2
--- /dev/null
@@ -0,0 +1,19 @@
+// PR c++/65592
+// { dg-do compile { target c++11 } }
+
+struct S
+{
+  enum class C { };
+};
+
+void
+bar (S::C)
+{
+}
+
+void
+foo ()
+{
+  S f;
+  bar (f.C::X);  // { dg-error "13:'X' is not a member" }
+}