+2017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/79361
+ * pt.c (register_specialization): Check duplicate_decls return value
+ for error_mark_node and pass it back.
+
2017-02-22 Jason Merrill <jason@redhat.com>
PR c++/79679 - missing destructor for argument
}
else if (DECL_TEMPLATE_SPECIALIZATION (fn))
{
- if (!duplicate_decls (spec, fn, is_friend) && DECL_INITIAL (spec))
+ tree dd = duplicate_decls (spec, fn, is_friend);
+ if (dd == error_mark_node)
+ /* We've already complained in duplicate_decls. */
+ return error_mark_node;
+
+ if (dd == NULL_TREE && DECL_INITIAL (spec))
/* Dup decl failed, but this is a new definition. Set the
line number so any errors match this new
definition. */
+2017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/79361
+ * g++.dg/cpp0x/pr79361-1.C: New.
+ * g++.dg/cpp0x/pr79361-2.C: Likewise.
+
2017-02-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc.target/visium/bit_test.c: Accept any lsr form.
--- /dev/null
+// PR c++/79361
+// { dg-do compile { target c++11 } }
+
+template<typename T> void foo(T);
+
+template<> void foo<int>(int) {} // { dg-message "declared" }
+template<> void foo<int>(int) = delete; // { dg-error "redefinition" }
--- /dev/null
+// PR c++/79361
+// { dg-do compile { target c++11 } }
+
+template<typename T> void foo(T);
+
+template<> void foo<int>(int) {} // { dg-message "declared" }
+template<> void foo<int>(int) = default; // { dg-error "redefinition" }