PATCH: PR fortran/42517: -fcheck=recursion does not work with -fopenmp

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Jan 5 16:34:00 GMT 2010


On Tue, Jan 05, 2010 at 04:19:22PM +0100, Tobias Burnus wrote:
> 
> On 01/05/2010 03:50 PM, Steve Kargl wrote:
> > On Tue, Jan 05, 2010 at 03:19:26PM +0100, Tobias Burnus wrote:
> >   
> >> +  /* Implied -frecursive; implemented as -fmax-stack-var-size=-1.  */
> >>     
> > This comment looks wrong
> >   
> >> +  if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp
> >> +      && gfc_option.flag_automatic)
> >>     
> > given the -2 here.
> >   
> 
> No, it should work fine: "-2" means untouched. Thus, if there is no
> -fmax-stack-var-size=<...>, it is modified. If it is -1 (due to
> -frecursion), the if branch is a no op.
> 

It is not clear.  The comment clearly states that 
-fmax-stack-var-size=-1, and your first conditional
is testing for a value of -2, which means it is always 
false.  In other words, your comment seems to be too
terse for what the code is actually doing.

-- 
Steve



More information about the Gcc-patches mailing list