Re: [PATCH 1/3] cfgcleanup: Bugfix in try_simplify_condjump

2016-05-03 Thread Segher Boessenkool
On Tue, May 03, 2016 at 10:28:37PM +0200, Steven Bosscher wrote: > On Tue, May 3, 2016 at 8:59 AM, Segher Boessenkool wrote: > > If the jump_block here contains just a return, we will crash later > > in invert_jump. Don't allow that case. > > But if jump_block contains a return, then it isn't the

Re: [PATCH 1/3] cfgcleanup: Bugfix in try_simplify_condjump

2016-05-03 Thread Steven Bosscher
On Tue, May 3, 2016 at 8:59 AM, Segher Boessenkool wrote: > If the jump_block here contains just a return, we will crash later > in invert_jump. Don't allow that case. But if jump_block contains a return, then it isn't the EXIT_BLOCK for the function. Is the conditional jump a conditional return

[PATCH 1/3] cfgcleanup: Bugfix in try_simplify_condjump

2016-05-03 Thread Segher Boessenkool
If the jump_block here contains just a return, we will crash later in invert_jump. Don't allow that case. 2016-05-03 Segher Boessenkool * cfgcleanup.c (try_simplify_condjump): Don't try to simplify a branch to a return. --- gcc/cfgcleanup.c | 1 + 1 file changed, 1 insertio