Fortran: -fno-automatic and -fopenacc / recusion check cleanup
authorTobias Burnus <tobias@codesourcery.com>
Mon, 30 Nov 2020 14:27:44 +0000 (15:27 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 30 Nov 2020 14:27:44 +0000 (15:27 +0100)
commitf4e7ea81d1369d4d6cb6d8e440aefb3407142e05
tree4f8d38858a78db5b1288637ff4807290bee08bda
parent2610c786f7496c5006bb68d6801ef7450bd231a9
Fortran: -fno-automatic and -fopenacc / recusion check cleanup

Options: -fopenmp and -fopenacc imply concurrent calls to a
procedure; now also -fopenacc implies -frecursive, disabling
that larger local const-size array variables use static memory.

Run-time recursion check: Always reset the check variable at the
end of the procedure; this avoids a bogus error with -fopenmp
when called twice nonconcurrently/nonrecursively. (Issue requires
using -fno-automatic or -fmax-stack-var-size= to trigger.)

gcc/fortran/ChangeLog:

PR fortran/98010
PR fortran/98013
* options.c (gfc_post_options): Also imply recursive with
-fopenacc.
* trans-decl.c (gfc_generate_function_code): Simplify condition.
gcc/fortran/options.c
gcc/fortran/trans-decl.c