aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2010-01-05 15:15:37 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2010-01-05 15:15:37 +0100
commit653f6dc599d1f0afa1a8be89e948c8aeca875911 (patch)
tree77dfe5d69160e908ad7f2e92fb3778e68a9ca0a0 /gcc/fortran/options.c
parentb9497ab5ed4bbc634652f6d699df73543c5b527f (diff)
downloadgcc-653f6dc599d1f0afa1a8be89e948c8aeca875911.zip
gcc-653f6dc599d1f0afa1a8be89e948c8aeca875911.tar.gz
gcc-653f6dc599d1f0afa1a8be89e948c8aeca875911.tar.bz2
re PR fortran/42517 (-fcheck=recursion does not work with -fopenmp)
2010-01-05 Tobias Burnus <burnus@net-b.de> PR fortran/42517 * options.c (gfc_post_options): Set -frecursion when -fopenmp is used. From-SVN: r155649
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 43c44db..9296a0b 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -353,18 +353,22 @@ gfc_post_options (const char **pfilename)
"implied by -fopenmp",
gfc_option.flag_max_stack_var_size);
- /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */
- if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp)
+ /* Implement -frecursive as -fmax-stack-var-size=-1. */
+ if (gfc_option.flag_recursive)
gfc_option.flag_max_stack_var_size = -1;
+ /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */
+ if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp
+ && gfc_option.flag_automatic)
+ {
+ gfc_option.flag_recursive = 1;
+ gfc_option.flag_max_stack_var_size = -1;
+ }
+
/* Set default. */
if (gfc_option.flag_max_stack_var_size == -2)
gfc_option.flag_max_stack_var_size = 32768;
- /* Implement -frecursive as -fmax-stack-var-size=-1. */
- if (gfc_option.flag_recursive)
- gfc_option.flag_max_stack_var_size = -1;
-
/* Implement -fno-automatic as -fmax-stack-var-size=0. */
if (!gfc_option.flag_automatic)
gfc_option.flag_max_stack_var_size = 0;