Commit 78a5fce0 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/83897 (Useless __builtin_unreachable () emitted by the C++ FE)

	PR c++/83897
	* cp-gimplify.c (cp_maybe_instrument_return): Handle
	CLEANUP_POINT_EXPR.

	* g++.dg/cpp0x/pr83897.C: New test.

From-SVN: r256819
parent a99670f9
2018-01-17 Jakub Jelinek <jakub@redhat.com>
PR c++/83897
* cp-gimplify.c (cp_maybe_instrument_return): Handle
CLEANUP_POINT_EXPR.
2018-01-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/81054
......
......@@ -1581,6 +1581,7 @@ cp_maybe_instrument_return (tree fndecl)
t = BIND_EXPR_BODY (t);
continue;
case TRY_FINALLY_EXPR:
case CLEANUP_POINT_EXPR:
t = TREE_OPERAND (t, 0);
continue;
case STATEMENT_LIST:
......
2018-01-17 Jakub Jelinek <jakub@redhat.com>
PR c++/83897
* g++.dg/cpp0x/pr83897.C: New test.
2018-01-17 Jan Hubicka <hubicka@ucw.cz>
PR ipa/83051
......
// PR c++/83897
// { dg-do compile { target c++11 } }
// { dg-options "-O2 -fdump-tree-gimple" }
// { dg-final { scan-tree-dump-not "__builtin_unreachable" "gimple" } }
struct A {};
struct B { int a; int b = 5; };
A
bar (B)
{
return {};
}
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