PATCH: PR fortran/42517: -fcheck=recursion does not work with -fopenmp
Tobias Burnus
burnus@net-b.de
Tue Jan 5 16:55:00 GMT 2010
On 01/05/2010 05:34 PM, Steve Kargl 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. [...]
>
> It is not clear.
I agree.
> The comment clearly states that
> -fmax-stack-var-size=-1, and your first conditional
> is testing for a value of -2
I disagree. It does not state that it is "-1", it states that it is
"implemented as" "-1". Thus, in terms of the code, max-stack-var-size is
set to "-1" in the "-fopenmp" if-block.
> In other words, your comment seems to be too
> terse for what the code is actually doing.
Actually, it is not my comment; I just moved the if(-frecursive) block
up, added a "&& !-fno-automatic" and a "option_recursive = 1".
Do you have a good suggestion for the wording?
A minimal change would be
"Implied -frecursive" -> "Implies -frecursive"
which is IMHO a bit clearer.
Tobias
More information about the Gcc-patches
mailing list