From: Paolo Carlini Date: Fri, 10 Jul 2015 09:33:34 +0000 (+0000) Subject: re PR c++/65592 (internal compiler error: Segmentation fault when using non-existent... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ed28ff99773bddc7a187249e86aab630665d7db;p=gcc.git 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 --- 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" } +}