diff options
author | Richard Guenther <rguenther@suse.de> | 2010-01-26 15:09:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-01-26 15:09:43 +0000 |
commit | 3333cd50b87db95a83b3afebee66d2b8321f1fa1 (patch) | |
tree | 52ce17343c80841e1ac188ff00e373b1084c24a7 | |
parent | c94a0b9db5c64cf15f6b0971252069429f10e8ac (diff) | |
download | gcc-3333cd50b87db95a83b3afebee66d2b8321f1fa1.zip gcc-3333cd50b87db95a83b3afebee66d2b8321f1fa1.tar.gz gcc-3333cd50b87db95a83b3afebee66d2b8321f1fa1.tar.bz2 |
re PR tree-optimization/42806 ("-fcompare-debug failure (length)" at -O1 in recent builds)
2010-01-26 Richard Guenther <rguenther@suse.de>
PR middle-end/42806
* tree-eh.c (unsplit_eh): Skip debug insns.
* g++.dg/other/pr42806.C: New testcase.
From-SVN: r156249
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/pr42806.C | 22 | ||||
-rw-r--r-- | gcc/tree-eh.c | 7 |
4 files changed, 37 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da237e7..5d34ebb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-01-26 Richard Guenther <rguenther@suse.de> + PR middle-end/42806 + * tree-eh.c (unsplit_eh): Skip debug insns. + +2010-01-26 Richard Guenther <rguenther@suse.de> + PR tree-optimization/42250 * ipa-type-escape.c (type_escape_execute): Do not analyze clones. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3cdaee3..0238f4c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2010-01-26 Richard Guenther <rguenther@suse.de> + PR middle-end/42806 + * g++.dg/other/pr42806.C: New testcase. + +2010-01-26 Richard Guenther <rguenther@suse.de> + PR tree-optimization/42250 * gcc.dg/pr42250.c: New testcase. diff --git a/gcc/testsuite/g++.dg/other/pr42806.C b/gcc/testsuite/g++.dg/other/pr42806.C new file mode 100644 index 0000000..9823238 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr42806.C @@ -0,0 +1,22 @@ +// { dg-do compile } +// { dg-options "-O -fcompare-debug" } + +struct S1 { + ~S1() { } +}; + +struct S2 { + S1 s1; + void m(); + ~S2() { m(); } +}; + +struct S3 { + S3(int, S2); +}; + +void foo() +{ + S3(0, S2()); +} + diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 1a9e7b5..2cb334f 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3350,8 +3350,11 @@ unsplit_eh (eh_landing_pad lp) if ((e_in->flags & EDGE_EH) == 0 || (e_out->flags & EDGE_EH) != 0) return false; - /* The block must be empty except for the labels. */ - if (!gsi_end_p (gsi_after_labels (bb))) + /* The block must be empty except for the labels and debug insns. */ + gsi = gsi_after_labels (bb); + if (!gsi_end_p (gsi) && is_gimple_debug (gsi_stmt (gsi))) + gsi_next_nondebug (&gsi); + if (!gsi_end_p (gsi)) return false; /* The destination block must not already have a landing pad |