Commit d8b4baeb by Paolo Carlini Committed by Paolo Carlini

re PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression…

re PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression ‘foo’ of kind overload)

/cp
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/70266
	* except.c (build_must_not_throw_expr): Perform the implicit
	conversions on the condition.

/testsuite
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/70266
	* g++.dg/tm/pr70266.C: New.

From-SVN: r245901
parent ef78bc3c
2017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70266
* except.c (build_must_not_throw_expr): Perform the implicit
conversions on the condition.
2017-03-03 Jason Merrill <jason@redhat.com>
* mangle.c (mangle_decl): Check -Wnoexcept-type instead of
......
......@@ -268,6 +268,9 @@ build_must_not_throw_expr (tree body, tree cond)
if (cond && !value_dependent_expression_p (cond))
{
cond = perform_implicit_conversion_flags (boolean_type_node, cond,
tf_warning_or_error,
LOOKUP_NORMAL);
cond = cxx_constant_value (cond);
if (integer_zerop (cond))
return body;
......
2017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70266
* g++.dg/tm/pr70266.C: New.
2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
......
// { dg-do compile { target c++11 } }
// { dg-options "-fgnu-tm" }
template < typename T >
int foo (int x, T t)
{
return __transaction_atomic noexcept (foo) (1); // { dg-error "cannot resolve" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment