Commit 53406315 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/53812 (lower_stmt (4.6), verify_gimple_stmt (4.7.0, 4.7.1))

	PR c++/53812
	* semantics.c (finish_goto_stmt): Surround computed goto argument
	with CLEANUP_POINT_EXPR if needed.

	* g++.dg/ext/label14.C: New test.

From-SVN: r189225
parent 95a3d9ee
2012-07-03 Jakub Jelinek <jakub@redhat.com>
PR c++/53812
* semantics.c (finish_goto_stmt): Surround computed goto argument
with CLEANUP_POINT_EXPR if needed.
2012-07-02 Jason Merrill <jason@redhat.com>
PR c++/53619
......
......@@ -571,6 +571,9 @@ finish_goto_stmt (tree destination)
tf_warning_or_error);
if (error_operand_p (destination))
return NULL_TREE;
destination
= fold_build_cleanup_point_expr (TREE_TYPE (destination),
destination);
}
}
......
2012-07-03 Jakub Jelinek <jakub@redhat.com>
PR c++/53812
* g++.dg/ext/label14.C: New test.
2012-07-03 Uros Bizjak <ubizjak@gmail.com>
PR target/53811
......
// PR c++/53812
// { dg-do compile }
// { dg-options "" }
struct T { T () : t(0) {}; int t; ~T (); };
struct S { void *operator [] (T); };
void bar (S &, void *, void *);
void
foo (S &x, T &y)
{
bar (x, &&l1, &&l2);
l1:
goto *x[y];
l2:
bar (x, &&l1, &&l2);
}
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