mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 00:21:03 +08:00
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
This commit is contained in:
parent
c94a0b9db5
commit
3333cd50b8
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
22
gcc/testsuite/g++.dg/other/pr42806.C
Normal file
22
gcc/testsuite/g++.dg/other/pr42806.C
Normal file
@ -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());
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user