gfortran.h (gfc_option_t): Remove warn_aliasing,
[gcc.git] / gcc / fortran / frontend-passes.c
index 97a9164b44d0a417c1e1a4c9ebc18860219d012d..799d2fedddc210ca34972423381b3754e9fbd363 100644 (file)
@@ -546,7 +546,7 @@ create_var (gfc_expr * e)
       result->ref->u.ar.where = e->where;
       result->ref->u.ar.as = symbol->ts.type == BT_CLASS
                             ? CLASS_DATA (symbol)->as : symbol->as;
-      if (gfc_option.warn_array_temp)
+      if (warn_array_temporaries)
        gfc_warning ("Creating array temporary at %L", &(e->where));
     }
 
@@ -565,7 +565,7 @@ create_var (gfc_expr * e)
 /* Warn about function elimination.  */
 
 static void
-warn_function_elimination (gfc_expr *e)
+do_warn_function_elimination (gfc_expr *e)
 {
   if (e->expr_type != EXPR_FUNCTION)
     return;
@@ -618,8 +618,8 @@ cfe_expr_0 (gfc_expr **e, int *walk_subtrees,
              if (newvar == NULL)
                newvar = create_var (*ei);
 
-             if (gfc_option.warn_function_elimination)
-               warn_function_elimination (*ej);
+             if (warn_function_elimination)
+               do_warn_function_elimination (*ej);
 
              free (*ej);
              *ej = gfc_copy_expr (newvar);
@@ -1708,17 +1708,19 @@ doloop_code (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
                  && a->expr->symtree->n.sym == do_sym)
                {
                  if (f->sym->attr.intent == INTENT_OUT)
-                   gfc_error_now("Variable '%s' at %L set to undefined value "
-                                 "inside loop  beginning at %L as INTENT(OUT) "
-                                 "argument to subroutine '%s'", do_sym->name,
-                                 &a->expr->where, &doloop_list[i]->loc,
-                                 co->symtree->n.sym->name);
+                   gfc_error_now_1 ("Variable '%s' at %L set to undefined "
+                                    "value inside loop  beginning at %L as "
+                                    "INTENT(OUT) argument to subroutine '%s'",
+                                    do_sym->name, &a->expr->where,
+                                    &doloop_list[i]->loc,
+                                    co->symtree->n.sym->name);
                  else if (f->sym->attr.intent == INTENT_INOUT)
-                   gfc_error_now("Variable '%s' at %L not definable inside loop "
-                                 "beginning at %L as INTENT(INOUT) argument to "
-                                 "subroutine '%s'", do_sym->name,
-                                 &a->expr->where, &doloop_list[i]->loc,
-                                 co->symtree->n.sym->name);
+                   gfc_error_now_1 ("Variable '%s' at %L not definable inside "
+                                    "loop beginning at %L as INTENT(INOUT) "
+                                    "argument to subroutine '%s'",
+                                    do_sym->name, &a->expr->where,
+                                    &doloop_list[i]->loc,
+                                    co->symtree->n.sym->name);
                }
            }
          a = a->next;
@@ -1778,17 +1780,17 @@ do_function (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
              && a->expr->symtree->n.sym == do_sym)
            {
              if (f->sym->attr.intent == INTENT_OUT)
-               gfc_error_now("Variable '%s' at %L set to undefined value "
-                             "inside loop beginning at %L as INTENT(OUT) "
-                             "argument to function '%s'", do_sym->name,
-                             &a->expr->where, &doloop_list[i]->loc,
-                             expr->symtree->n.sym->name);
+               gfc_error_now_1 ("Variable '%s' at %L set to undefined value "
+                                "inside loop beginning at %L as INTENT(OUT) "
+                                "argument to function '%s'", do_sym->name,
+                                &a->expr->where, &doloop_list[i]->loc,
+                                expr->symtree->n.sym->name);
              else if (f->sym->attr.intent == INTENT_INOUT)
-               gfc_error_now("Variable '%s' at %L not definable inside loop "
-                             "beginning at %L as INTENT(INOUT) argument to "
-                             "function '%s'", do_sym->name,
-                             &a->expr->where, &doloop_list[i]->loc,
-                             expr->symtree->n.sym->name);
+               gfc_error_now_1 ("Variable '%s' at %L not definable inside loop"
+                                " beginning at %L as INTENT(INOUT) argument to"
+                                " function '%s'", do_sym->name,
+                                &a->expr->where, &doloop_list[i]->loc,
+                                expr->symtree->n.sym->name);
            }
        }
       a = a->next;