Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-02-01 Thread Thomas Koenig
Hi Steve, On Wed, Feb 01, 2012 at 12:47:28AM +0100, Thomas Koenig wrote: Hi Steve, + else_stmt->expr1 = NULL; + else_stmt->next = c_if1; + else_stmt->block = NULL; + else_stmt->next = c_if1; Is one of the else_stmt->next = c_if1; redundant? Definitely. I'll take it ou

Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-01-31 Thread Steve Kargl
On Wed, Feb 01, 2012 at 12:47:28AM +0100, Thomas Koenig wrote: > Hi Steve, > > >+ else_stmt->expr1 = NULL; > >+ else_stmt->next = c_if1; > >+ else_stmt->block = NULL; > >+ else_stmt->next = c_if1; > > > >Is one of the else_stmt->next = c_if1; redundant? > > > > Definitely. I'

Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-01-31 Thread Thomas Koenig
Hi Steve, + else_stmt->expr1 = NULL; + else_stmt->next = c_if1; + else_stmt->block = NULL; + else_stmt->next = c_if1; Is one of the else_stmt->next = c_if1; redundant? Definitely. I'll take it out when I commit the patch. Thomas

Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-01-31 Thread Steve Kargl
On Wed, Feb 01, 2012 at 12:07:35AM +0100, Thomas Koenig wrote: > Hi Tobias, > > here is an updated version of the patch, with a more extensive test > case. Also regression-tested. > > OK for trunk? > + /* Insert the new IF after the ELSE. */ + else_stmt->expr1 = NULL; + else_st

Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-01-31 Thread Thomas Koenig
Hi Tobias, here is an updated version of the patch, with a more extensive test case. Also regression-tested. OK for trunk? Thomas 2012-01-31 Thomas König PR fortran/51958 * frontend-passes.c (convert_elseif): New function. (optimize_namespace): Call it.

Re: [patch, fortran] Fix PR 51958, wrong-code regression with function elimination

2012-01-30 Thread Thomas Koenig
Hi Tobias, I found a bug in my patch, which I am currently correcting. *grumble* Watch this space! Thomas