Commit 63f2ff0f by Richard Biener Committed by Richard Biener

re PR rtl-optimization/55740 (ICE in verify_loop_structure, at cfgloop.c:1582,…

re PR rtl-optimization/55740 (ICE in verify_loop_structure, at cfgloop.c:1582, error: loop 2's header does not belong directly to it)

2012-12-20  Richard Biener  <rguenther@suse.de>

	PR middle-end/55740
	* cfghooks.c (merge_blocks): Properly handle merging of
	two loop headers.

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

From-SVN: r194633
parent eadd3d0d
2012-12-20 Richard Biener <rguenther@suse.de>
PR middle-end/55740
* cfghooks.c (merge_blocks): Properly handle merging of
two loop headers.
2012-12-20 Roland Stigge <stigge@debian.org>
Matthias Klose <doko@ubuntu.com>
......@@ -724,11 +724,23 @@ merge_blocks (basic_block a, basic_block b)
cfg_hooks->merge_blocks (a, b);
/* If we merge a loop header into its predecessor, update the loop
structure. */
if (current_loops != NULL)
{
if (b->loop_father->header == b)
/* If the block we merge into is a loop header do nothing unless ... */
if (a->loop_father->header == a)
{
/* ... we merge two loop headers, in which case we kill
the inner loop. */
if (b->loop_father->header == b)
{
b->loop_father->header = NULL;
b->loop_father->latch = NULL;
loops_state_set (LOOPS_NEED_FIXUP);
}
}
/* If we merge a loop header into its predecessor, update the loop
structure. */
else if (b->loop_father->header == b)
{
remove_bb_from_loops (a);
add_bb_to_loop (a, b->loop_father);
......
2012-12-20 Richard Biener <rguenther@suse.de>
PR middle-end/55740
* g++.dg/torture/pr55740.C: New testcase.
2012-12-20 Jakub Jelinek <jakub@redhat.com>
PR c++/55619
......
// { dg-do compile }
static bool st_IsPathDelimiter( char c ) { return c == '/'; }
bool IsValidPath( char const * filename )
{
if ( !filename || filename[0] == 0 )
return false;
char const * run = filename;
while ( run && *run )
{
if ( run[0] == '.' )
if ( run[1] != '.' || ( !st_IsPathDelimiter( run[2] ) && run[2] != 0 ) )
return false;
while ( *run && !st_IsPathDelimiter( *run ) )
++run;
if ( *run )
++run;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment