2017-03-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71966
* g++.dg/cpp0x/pr71966-1.C: New.
* g++.dg/cpp0x/pr71966-2.C: Likewise.
From-SVN: r246000
+2017-03-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71966
+ * g++.dg/cpp0x/pr71966-1.C: New.
+ * g++.dg/cpp0x/pr71966-2.C: Likewise.
+
2017-03-09 Martin Liska <mliska@suse.cz>
PR tree-optimization/79631
--- /dev/null
+// PR c++/71966
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ constexpr A (int); // { dg-message "never defined" }
+ constexpr operator int () const { return 0; }
+};
+
+template < int > struct B {};
+
+constexpr A a = 0; // { dg-error "before its definition" }
+B < a > b;
--- /dev/null
+// PR c++/71966
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ constexpr A (int); // { dg-message "never defined" }
+ constexpr operator int () const { return 0; }
+ int c;
+};
+
+template <int>
+struct B {};
+
+constexpr A a = 0; // { dg-error "before its definition" }
+B<a> b;