summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-12 17:55:36 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-12 17:55:36 +0000
commit147f11a7ef473938ceceba4583edb1e24b3e1d5f (patch)
tree84e348fd43f73f9669e6bc1af8e4795e47ee65f3 /gcc/bb-reorder.c
parentb4eeceb9b7f596eef6a585effb14cd3850a273cc (diff)
downloadgcc-147f11a7ef473938ceceba4583edb1e24b3e1d5f.tar.gz
PR rtl-optimization/50212
* bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges): Skip also lps with NULL landing_pad or non-LABEL_P landing_pad. * g++.dg/other/pr50212.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 874ece2a9ad..3ac7fbd6034 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1,5 +1,5 @@
/* Basic block reordering routines for the GNU compiler.
- Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
+ Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@@ -1315,7 +1315,9 @@ find_rarely_executed_basic_blocks_and_crossing_edges (void)
{
bool all_same, all_diff;
- if (lp == NULL)
+ if (lp == NULL
+ || lp->landing_pad == NULL_RTX
+ || !LABEL_P (lp->landing_pad))
continue;
all_same = all_diff = true;