diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/options.c | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6a59425..7de1ba7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2010-01-05 Tobias Burnus <burnus@net-b.de> + PR fortran/42517 + * options.c (gfc_post_options): Set -frecursion + when -fopenmp is used. + +2010-01-05 Tobias Burnus <burnus@net-b.de> + PR fortran/41872 * trans-expr.c (gfc_conv_procedure_call): Nullify return value for allocatable-scalar character functions. 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; |