/* Get region for default val of DECL_RESULT within the
callee. */
- tree result_default_ssa = get_ssa_default_def (fun, result);
- gcc_assert (result_default_ssa);
- const region *callee_result_reg
- = get_lvalue (result_default_ssa, ctxt);
+ if (tree result_default_ssa = get_ssa_default_def (fun, result))
+ {
+ const region *callee_result_reg
+ = get_lvalue (result_default_ssa, ctxt);
- /* Set the callee's reference to refer to the caller's lhs. */
- set_value (callee_result_reg, ref_sval, ctxt);
+ /* Set the callee's reference to refer to the caller's lhs. */
+ set_value (callee_result_reg, ref_sval, ctxt);
+ }
}
}
else
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+template <typename _Tp> struct remove_cv {
+ using type = _Tp;
+};
+struct basic_string {
+ ~basic_string();
+};
+template <typename T> using remove_cvref_t = remove_cv<T>;
+template <typename> struct basic_string_view {};
+template <typename> struct basic_format_string;
+auto format(...) -> basic_string {} // { dg-warning "no return statement" }
+template <int N>
+auto compile_string_to_view(const char (&)[N]) -> basic_string_view<char>;
+
+void MallocError() {
+ format([] {
+ using char_type = remove_cvref_t<decltype(0)>;
+ struct FMT_COMPILE_STRING {
+ operator char_type() {} // { dg-warning "no return statement" }
+ };
+ return FMT_COMPILE_STRING();
+ });
+}