+2018-03-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/83937 - wrong C++17 handling of init-list ctor argument.
+ * call.c (build_special_member_call): Don't convert an init-list
+ argument directly to the class type.
+
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c++/79937
/* If we're using this to initialize a non-temporary object, don't
require the destructor to be accessible. */
sub_complain |= tf_no_cleanup;
- if (!reference_related_p (class_type, TREE_TYPE (arg)))
+ if (BRACE_ENCLOSED_INITIALIZER_P (arg)
+ && !CONSTRUCTOR_IS_DIRECT_INIT (arg))
+ /* An init-list arg needs to convert to the parm type (83937), so fall
+ through to normal processing. */
+ arg = error_mark_node;
+ else if (!reference_related_p (class_type, TREE_TYPE (arg)))
arg = perform_implicit_conversion_flags (class_type, arg,
sub_complain,
flags);