* call.c (convert_like_real): Only give warnings with tf_warning.
* g++.dg/warn/conv5.C: New test.
From-SVN: r270021
+2019-03-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89876 - ICE with deprecated conversion.
+ * call.c (convert_like_real): Only give warnings with tf_warning.
+
2019-03-28 Marek Polacek <polacek@redhat.com>
PR c++/89612 - ICE with member friend template with noexcept.
case ck_qual:
/* Warn about deprecated conversion if appropriate. */
- string_conv_p (totype, expr, 1);
+ if (complain & tf_warning)
+ string_conv_p (totype, expr, 1);
break;
case ck_ptr:
PR c++/89871
* g++.dg/cpp2a/desig14.C: New test.
+ PR c++/89876 - ICE with deprecated conversion.
+ * g++.dg/warn/conv5.C: New test.
+
2019-03-29 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/ipa-icf-39.c: Prine '***dbgcnt' output.
--- /dev/null
+// PR c++/89876
+// { dg-do compile { target c++11 } }
+// { dg-prune-output "sorry" }
+
+template <typename T>
+T f (T, char*);
+
+template <typename T>
+decltype (f (T (), "")) g (T) { return ""; } // { dg-error "invalid conversion" }
+
+void h () { g (0); }