re PR tree-optimization/58532 (bootstrap failure with BOOT_CFLAGS="-g -O3")

2013-09-30  Richard Biener  <rguenther@suse.de>

	PR middle-end/58532
	* tree-cfg.c (make_abnormal_goto_edges): Skip debug statements
	before looking for setjmp-like calls.

	* g++.dg/torture/pr58552.C: New testcase.

From-SVN: r203024
This commit is contained in:
Richard Biener 2013-09-30 07:44:46 +00:00 committed by Richard Biener
parent cb2c51a497
commit 791d904434
4 changed files with 43 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-09-30 Richard Biener <rguenther@suse.de>
PR middle-end/58532
* tree-cfg.c (make_abnormal_goto_edges): Skip debug statements
before looking for setjmp-like calls.
2013-09-29 Iain Sandoe <iain@codesourcery.com>
PR target/10901

View File

@ -1,3 +1,8 @@
2013-09-30 Richard Biener <rguenther@suse.de>
PR middle-end/58532
* g++.dg/torture/pr58552.C: New testcase.
2013-09-27 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/p8vector-ldst.c: New test for -mupper-regs-sf

View File

@ -0,0 +1,29 @@
// { dg-do compile }
// { dg-additional-options "-fcompare-debug" }
extern void fancy_abort () __attribute__ ((__noreturn__));
extern "C" {
struct __jmp_buf_tag { };
typedef struct __jmp_buf_tag jmp_buf[1];
extern int _setjmp (struct __jmp_buf_tag __env[1]) throw ();
}
extern void *gfc_state_stack;
static jmp_buf eof_buf;
static void push_state ()
{
if (!gfc_state_stack)
fancy_abort ();
}
bool gfc_parse_file (void)
{
int seen_program=0;
if (_setjmp (eof_buf))
return false;
if (seen_program)
goto duplicate_main;
seen_program = 1;
push_state ();
push_state ();
duplicate_main:
return true;
}

View File

@ -1013,6 +1013,9 @@ make_abnormal_goto_edges (basic_block bb, bool for_call)
break;
}
}
if (!gsi_end_p (gsi)
&& is_gimple_debug (gsi_stmt (gsi)))
gsi_next_nondebug (&gsi);
if (!gsi_end_p (gsi))
{
/* Make an edge to every setjmp-like call. */