From 7ed28ff99773bddc7a187249e86aab630665d7db Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 10 Jul 2015 09:33:34 +0000 Subject: [PATCH] re PR c++/65592 (internal compiler error: Segmentation fault when using non-existent enum class enumerator) 2015-07-10 Paolo Carlini PR c++/65592 * g++.dg/cpp0x/scoped_enum6.C: New. From-SVN: r225658 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/scoped_enum6.C | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/scoped_enum6.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 59e446c43cf..eb59054b49a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-10 Paolo Carlini + + PR c++/65592 + * g++.dg/cpp0x/scoped_enum6.C: New. + 2015-07-10 Tom de Vries * 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 index 00000000000..34a56b20f0d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum6.C @@ -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" } +} -- 2.30.2