From 1197e78957aea05816665f843e4a0b936c847e07 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 15 Jan 2010 11:53:26 +0000 Subject: re PR middle-end/42739 (ICE with computed goto, destructors, and optimization) 2010-01-15 Richard Guenther PR middle-end/42739 * tree-cfgcleanup.c (remove_forwarder_block): Move destination labels of computed or non-local gotos to the destination. * tree-cfg.c (gimple_verify_flow_info): Verify that a EH landing pad label is the first label. * g++.dg/torture/pr42739.C: New testcase. From-SVN: r155937 --- gcc/tree-cfg.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/tree-cfg.c') diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 4ba9dd7..0a3d544 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4268,6 +4268,15 @@ gimple_verify_flow_info (void) err = 1; } + if (prev_stmt && EH_LANDING_PAD_NR (label) != 0) + { + error ("EH landing pad label "); + print_generic_expr (stderr, label, 0); + fprintf (stderr, " is not first in a sequence of labels in bb %d", + bb->index); + err = 1; + } + if (label_to_block (label) != bb) { error ("label "); -- cgit v1.1