2018-02-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71662
* g++.dg/cpp0x/scoped_enum7.C: New.
From-SVN: r257439
+2018-02-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71662
+ * g++.dg/cpp0x/scoped_enum7.C: New.
+
2018-02-07 Christophe Lyon <christophe.lyon@linaro.org>
PR tree-optimization/83008
--- /dev/null
+// PR c++/71662
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-Wno-return-type" }
+
+template < typename T > struct A
+{
+ enum E : T;
+ E h ();
+};
+
+A < int > a;
+A < int >::E b = a.h ();
+
+template < typename T > enum A < T >::E : T { e }; // { dg-message "enumeration" }
+
+template < typename T > typename A < T >::E A < T >::h ()
+{
+ return e; // { dg-error "declared" }
+}