Commit 1483bddb by Mark Mitchell Committed by Mark Mitchell

stmt.c (expand_return): Call start_cleanup_deferral and end_cleanup_deferral…

stmt.c (expand_return): Call start_cleanup_deferral and end_cleanup_deferral around conditional code.

	* stmt.c (expand_return): Call start_cleanup_deferral and
	end_cleanup_deferral around conditional code.

From-SVN: r27018
parent 54585825
Wed May 19 03:56:56 1999 Mark Mitchell <mark@codesourcery.com>
* stmt.c (expand_return): Call start_cleanup_deferral and
end_cleanup_deferral around conditional code.
Wed May 19 03:10:08 1999 Bruce Korb <ddsinc09@ix.netcom.com>
* fixinc/fixincl.tpl: Avoid depending on ANSI C features for
......
......@@ -2703,6 +2703,7 @@ expand_return (retval)
tree expr;
do_jump (TREE_OPERAND (retval_rhs, 0), label, NULL_RTX);
start_cleanup_deferral ();
expr = build (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (current_function_decl)),
DECL_RESULT (current_function_decl),
TREE_OPERAND (retval_rhs, 1));
......@@ -2715,6 +2716,7 @@ expand_return (retval)
TREE_OPERAND (retval_rhs, 2));
TREE_SIDE_EFFECTS (expr) = 1;
expand_return (expr);
end_cleanup_deferral ();
return;
}
......
// Origin: Bryan Scattergood <bryan@fsel.com>
// Special g++ Options: -O -fno-exceptions
extern "C" void abort();
class A
{
public:
A();
~A();
int foo();
};
A::A() {}
A::~A() { abort (); }
int A::foo() {}
extern int f()
{
return 0;
}
int main()
{
return ((f() != 0) ? A().foo() : 0);
}
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