else if (!flag_automatic && flag_recursive)
gfc_warning_now (OPT_Woverwrite_recursive, "Flag %<-fno-automatic%> "
"overwrites %<-frecursive%>");
- else if (!flag_automatic && flag_openmp)
- gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%> implied by "
- "%<-fopenmp%>");
+ else if (!flag_automatic && (flag_openmp || flag_openacc))
+ gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%> "
+ "implied by %qs", flag_openmp ? "-fopenmp" : "-fopenacc");
else if (flag_max_stack_var_size != -2 && flag_recursive)
gfc_warning_now (0, "Flag %<-frecursive%> overwrites %<-fmax-stack-var-size=%d%>",
flag_max_stack_var_size);
- else if (flag_max_stack_var_size != -2 && flag_openmp)
- gfc_warning_now (0, "Flag %<-fmax-stack-var-size=%d%> overwrites %<-frecursive%> "
- "implied by %<-fopenmp%>", flag_max_stack_var_size);
+ else if (flag_max_stack_var_size != -2 && (flag_openmp || flag_openacc))
+ gfc_warning_now (0, "Flag %<-fmax-stack-var-size=%d%> overwrites "
+ "%<-frecursive%> implied by %qs", flag_max_stack_var_size,
+ flag_openmp ? "-fopenmp" : "-fopenacc");
/* Implement -frecursive as -fmax-stack-var-size=-1. */
if (flag_recursive)
flag_max_stack_var_size = -1;
/* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */
- if (flag_max_stack_var_size == -2 && flag_openmp && flag_automatic)
+ if (flag_max_stack_var_size == -2 && flag_automatic
+ && (flag_openmp || flag_openacc))
{
flag_recursive = 1;
flag_max_stack_var_size = -1;
gfc_init_block (&cleanup);
/* Reset recursion-check variable. */
- if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION)
- && !is_recursive && !flag_openmp && recurcheckvar != NULL_TREE)
+ if (recurcheckvar != NULL_TREE)
{
gfc_add_modify (&cleanup, recurcheckvar, logical_false_node);
recurcheckvar = NULL;