PR c++/82401
* name-lookup.c (member_name_cmp): Return 0 if a == b.
* g++.dg/cpp0x/pr82401.C: New test.
From-SVN: r255084
+2017-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82401
+ * name-lookup.c (member_name_cmp): Return 0 if a == b.
+
2017-11-22 David Malcolm <dmalcolm@redhat.com>
PR c++/62170
how we order these. Use UID as a proxy for source ordering, so
that identically-located decls still have a well-defined stable
ordering. */
- return DECL_UID (a) < DECL_UID (b) ? -1 : +1;
+ if (DECL_UID (a) != DECL_UID (b))
+ return DECL_UID (a) < DECL_UID (b) ? -1 : +1;
+ gcc_assert (a == b);
+ return 0;
}
static struct {
+2017-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82401
+ * g++.dg/cpp0x/pr82401.C: New test.
+
2017-11-22 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/82588
--- /dev/null
+// PR c++/82401
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+template <typename T> struct A
+{
+ enum E : T;
+ void h ();
+};
+template <typename T> enum A<T>::E : T { e1, e2 };
+template <> enum A<long long>::E : long long {};
+template <typename T> struct C
+{
+ enum class E : T;
+};
+C<int>::E c3 = C<int>::E::e1; // { dg-error "is not a member of" }