This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] patch PR 17229


François-Xavier Coudert wrote:
> This patch fixes PR fortran/17229, enabling gfortran to recognize an 
> arithmetic IF statement embedded in a simple IF statement:
> 
>         if (logical) if (integer) 100, 200, 300
> 
> This is used in some scientific libraries as FMLIB/ZMLIB and is a regression 
> WRT g77. *strapped and regested on i686-linux for both 4.0 and mainline. OK?

Great.  Two points:
1. this is an extension as I pointed out in the PR so we should issue a
warning and reject this if pedantic.
2. can you arrange match_if to also call this function? (In that case of
course it would only be an obsolete statement, as Walt Brainerd mentioned
yesterday, and a different warning should be issued.  So if  that the gains
from merging this might not be worth it.)

One thing about the testcase
>    20 i = 1
>       if (l) if (i) 999,999,30
>       go to 999
>    30 stop

Stop outputs things to the console which testcases shouldn't do.  Please
rearrage the code in the obvious way.

Otherwise ok.

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]