]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
convert each use of gfc_free (p) to free (p)
authormeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Apr 2011 19:20:53 +0000 (19:20 +0000)
committermeyering <meyering@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Apr 2011 19:20:53 +0000 (19:20 +0000)
Do that by running this command:
  perl -pi -e    's/\bgfc_free ?\(/free (/' \
    $(git grep -El '\bgfc_free ?\(')
which also corrects the few uses that lacked a space between
the function name and the open parenthesis.
Manually undo the change to the function definition itself
and its prototype.  They'll be removed next.
* array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
* constructor.c (node_free): Likewise.
* cpp.c (dump_queued_macros): Likewise.
* data.c (gfc_assign_data_value): Likewise.
* decl.c (free_variable, free_value, gfc_free_data): Likewise.
(gfc_free_data_all, match_old_style_init): Likewise.
(gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
Likewise.
(gfc_match_modproc): Likewise.
* dependency.c (check_section_vs_section): Likewise.
* error.c (gfc_pop_error, gfc_free_error): Likewise.
* expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
(gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
(find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
Likewise.
* frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
(strip_function_call, optimize_comparison): Likewise.
* interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
(CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
Likewise.
* intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
(gfc_convert_chartype): Likewise.
* io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
Likewise.
(gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
* match.c (gfc_free_iterator, gfc_match_associate): Likewise.
(gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
Likewise.
(free_case, gfc_free_forall_iterator): Likewise.
* misc.c: Likewise.
* module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
(free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
(mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
(mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
(mio_full_typebound_tree, skip_list, load_equiv): Likewise.
(free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
* openmp.c (gfc_free_omp_clauses): Likewise.
* options.c (gfc_post_options): Likewise.
* parse.c (select_type_pop, parse_omp_structured_block): Likewise.
* primary.c (gfc_free_structure_ctor_component): Likewise.
* resolve.c (resolve_structure_cons, check_host_association): Likewise.
(gfc_resolve_forall, resolve_equivalence): Likewise.
* scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
(gfc_define_undef_line, preprocessor_line, include_line): Likewise.
(load_file, gfc_read_orig_filename): Likewise.
* simplify.c (simplify_transformation_to_array): Likewise.
(gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
Likewise.
(gfc_simplify_compiler_options): Likewise.
* st.c (gfc_free_statement, gfc_free_statements): Likewise.
(gfc_free_association_list): Likewise.
* symbol.c (free_components, gfc_free_st_label, free_st_labels):
Likewise.
(gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
(free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
(free_common_tree, free_uop_tree, free_sym_tree): Likewise.
(gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
Likewise.
(gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
(gfc_free_namespace): Likewise.
* trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
(gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
(gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
* trans-common.c (get_init_field, create_common): Likewise.
* trans-const.c (gfc_build_wide_string_const): Likewise.
(gfc_conv_string_init): Likewise.
* trans-decl.c (gfc_generate_function_code): Likewise.
* trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
Likewise.
(SCALAR_POINTER, gfc_conv_statement_function): Likewise.
(gfc_trans_subarray_assign): Likewise.
* trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
* trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
(transfer_namelist_element, transfer_array_component): Likewise.
* trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
* trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
* trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172666 138bc75d-0d04-0410-961f-82ee72b054a4

35 files changed:
gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/constructor.c
gcc/fortran/cpp.c
gcc/fortran/data.c
gcc/fortran/decl.c
gcc/fortran/dependency.c
gcc/fortran/error.c
gcc/fortran/expr.c
gcc/fortran/frontend-passes.c
gcc/fortran/interface.c
gcc/fortran/intrinsic.c
gcc/fortran/io.c
gcc/fortran/match.c
gcc/fortran/misc.c
gcc/fortran/module.c
gcc/fortran/openmp.c
gcc/fortran/options.c
gcc/fortran/parse.c
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/fortran/scanner.c
gcc/fortran/simplify.c
gcc/fortran/st.c
gcc/fortran/symbol.c
gcc/fortran/trans-array.c
gcc/fortran/trans-common.c
gcc/fortran/trans-const.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans-io.c
gcc/fortran/trans-openmp.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.c

index 72229a5cb7ef8fe0d70d558140a709477c4f1c68..51e2515244a05ff851e949fb783c1c9b9e26536c 100644 (file)
@@ -1,3 +1,92 @@
+2011-04-18  Jim Meyering  <meyering@redhat.com>
+
+       convert each use of gfc_free (p) to free (p)
+       Do that by running this command:
+         perl -pi -e    's/\bgfc_free ?\(/free (/' \
+           $(git grep -El '\bgfc_free ?\(')
+       which also corrects the few uses that lacked a space between
+       the function name and the open parenthesis.
+       Manually undo the change to the function definition itself
+       and its prototype.  They'll be removed next.
+       * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
+       * constructor.c (node_free): Likewise.
+       * cpp.c (dump_queued_macros): Likewise.
+       * data.c (gfc_assign_data_value): Likewise.
+       * decl.c (free_variable, free_value, gfc_free_data): Likewise.
+       (gfc_free_data_all, match_old_style_init): Likewise.
+       (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
+       Likewise.
+       (gfc_match_modproc): Likewise.
+       * dependency.c (check_section_vs_section): Likewise.
+       * error.c (gfc_pop_error, gfc_free_error): Likewise.
+       * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
+       (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
+       (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
+       Likewise.
+       * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
+       (strip_function_call, optimize_comparison): Likewise.
+       * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
+       (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
+       Likewise.
+       * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
+       (gfc_convert_chartype): Likewise.
+       * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
+       Likewise.
+       (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
+       * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
+       (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
+       Likewise.
+       (free_case, gfc_free_forall_iterator): Likewise.
+       * misc.c: Likewise.
+       * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
+       (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
+       (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
+       (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
+       (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
+       (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
+       * openmp.c (gfc_free_omp_clauses): Likewise.
+       * options.c (gfc_post_options): Likewise.
+       * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
+       * primary.c (gfc_free_structure_ctor_component): Likewise.
+       * resolve.c (resolve_structure_cons, check_host_association): Likewise.
+       (gfc_resolve_forall, resolve_equivalence): Likewise.
+       * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
+       (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
+       (load_file, gfc_read_orig_filename): Likewise.
+       * simplify.c (simplify_transformation_to_array): Likewise.
+       (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
+       Likewise.
+       (gfc_simplify_compiler_options): Likewise.
+       * st.c (gfc_free_statement, gfc_free_statements): Likewise.
+       (gfc_free_association_list): Likewise.
+       * symbol.c (free_components, gfc_free_st_label, free_st_labels):
+       Likewise.
+       (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
+       (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
+       (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
+       (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
+       Likewise.
+       (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
+       (gfc_free_namespace): Likewise.
+       * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
+       (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
+       (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
+       * trans-common.c (get_init_field, create_common): Likewise.
+       * trans-const.c (gfc_build_wide_string_const): Likewise.
+       (gfc_conv_string_init): Likewise.
+       * trans-decl.c (gfc_generate_function_code): Likewise.
+       * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
+       Likewise.
+       (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
+       (gfc_trans_subarray_assign): Likewise.
+       * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
+       * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
+       (transfer_namelist_element, transfer_array_component): Likewise.
+       * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
+       * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
+       * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
+       Likewise.
+
 2011-04-15  Jim Meyering  <meyering@redhat.com>
 
        gfortran: remove cpp definition of free, ...
index 750d73315f2d7194ddc355451d28295f40512b06..e93cf9bcc9f991cc73027cdbd7c8a5e4f67a7b48 100644 (file)
@@ -289,7 +289,7 @@ gfc_free_array_spec (gfc_array_spec *as)
       gfc_free_expr (as->upper[i]);
     }
 
-  gfc_free (as);
+  free (as);
 }
 
 
@@ -757,7 +757,7 @@ gfc_set_array_spec (gfc_symbol *sym, gfc_array_spec *as, locus *error_loc)
        }
     }
 
-  gfc_free (as);
+  free (as);
   return SUCCESS;
 }
 
index 45228b0c47cfa53a79549dc3536406f440c8d56b..97399812d32c528f6c776bb9fd965138c3ae486c 100644 (file)
@@ -37,7 +37,7 @@ node_free (splay_tree_value value)
 
   mpz_clear (c->offset);
 
-  gfc_free (c);
+  free (c);
 }
 
 
index 4c1307c84968bb80f82a94d7392564d15089b990..0dece6cd536fb7b7e45b3a6bc0518bfbd5342eae 100644 (file)
@@ -1109,8 +1109,8 @@ dump_queued_macros (cpp_reader *pfile ATTRIBUTE_UNUSED)
       print.src_line++;
       oq = q;
       q = q->next;
-      gfc_free (oq->macro);
-      gfc_free (oq);
+      free (oq->macro);
+      free (oq);
     }
   cpp_define_queue = NULL;
   for (q = cpp_undefine_queue; q;)
@@ -1120,8 +1120,8 @@ dump_queued_macros (cpp_reader *pfile ATTRIBUTE_UNUSED)
       print.src_line++;
       oq = q;
       q = q->next;
-      gfc_free (oq->macro);
-      gfc_free (oq);
+      free (oq->macro);
+      free (oq);
     }
   cpp_undefine_queue = NULL;
 }
index b1cfd6ec75b082c3270d4596022ad74b02fdf3af..137a939d505f7117ad3f664715b79d16e7fa3a2a 100644 (file)
@@ -235,7 +235,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
            {
              gcc_assert (ref->u.ar.as->corank > 0);
              if (init == NULL)
-               gfc_free (expr);
+               free (expr);
              continue;
            }
 
index f7a704fd0b33e5c6817d5ecf60a3985dce4a3e8f..9efe01aac2c1c084b3b6fe172339b5948b1dfdfc 100644 (file)
@@ -119,7 +119,7 @@ free_variable (gfc_data_variable *p)
       gfc_free_expr (p->expr);
       gfc_free_iterator (&p->iter, 0);
       free_variable (p->list);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -136,7 +136,7 @@ free_value (gfc_data_value *p)
       q = p->next;
       mpz_clear (p->repeat);
       gfc_free_expr (p->expr);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -153,7 +153,7 @@ gfc_free_data (gfc_data *p)
       q = p->next;
       free_variable (p->var);
       free_value (p->value);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -168,7 +168,7 @@ gfc_free_data_all (gfc_namespace *ns)
   for (;ns->data;)
     {
       d = ns->data->next;
-      gfc_free (ns->data);
+      free (ns->data);
       ns->data = d;
     }
 }
@@ -491,14 +491,14 @@ match_old_style_init (const char *name)
   m = top_val_list (newdata);
   if (m != MATCH_YES)
     {
-      gfc_free (newdata);
+      free (newdata);
       return m;
     }
 
   if (gfc_pure (NULL))
     {
       gfc_error ("Initialization at %C is not allowed in a PURE procedure");
-      gfc_free (newdata);
+      free (newdata);
       return MATCH_ERROR;
     }
 
@@ -508,7 +508,7 @@ match_old_style_init (const char *name)
   /* Mark the variable as having appeared in a data statement.  */
   if (gfc_add_data (&sym->attr, sym->name, &sym->declared_at) == FAILURE)
     {
-      gfc_free (newdata);
+      free (newdata);
       return MATCH_ERROR;
     }
 
@@ -1220,7 +1220,7 @@ gfc_set_constant_character_len (int len, gfc_expr *expr, int check_len)
                        &expr->where, slen, check_len);
 
       s[len] = '\0';
-      gfc_free (expr->value.character.string);
+      free (expr->value.character.string);
       expr->value.character.string = s;
       expr->value.character.length = len;
     }
@@ -1275,7 +1275,7 @@ gfc_free_enum_history (void)
   while (current != NULL)
     {
       next = current->next;
-      gfc_free (current);
+      free (current);
       current = next;
     }
   max_enum = NULL;
@@ -3335,7 +3335,7 @@ match_attr_spec (void)
          else if (m == MATCH_YES)
            {
              merge_array_spec (as, current_as, false);
-             gfc_free (as);
+             free (as);
            }
 
          if (m == MATCH_NO)
@@ -7080,7 +7080,7 @@ syntax:
   while (interface != old_interface_head)
   {
     gfc_interface *i = interface->next;
-    gfc_free (interface);
+    free (interface);
     interface = i;
   }
 
index adfcd2a31329336f95f5bb7b31aea17c3003a268..d237a92a62e5093e62292320ff3566d86a98fc7f 100644 (file)
@@ -1159,7 +1159,7 @@ check_section_vs_section (gfc_array_ref *l_ar, gfc_array_ref *r_ar, int n)
   else
     start_comparison = -2;
       
-  gfc_free (one_expr);
+  free (one_expr);
 
   /* Determine LHS upper and lower bounds.  */
   if (l_dir == 1)
index bedb6297777b513d6480b23bd5ec628e8ed9c875..aee9173b66973844248229666edc7a4a66cdd4d5 100644 (file)
@@ -1050,7 +1050,7 @@ gfc_pop_error (gfc_error_buf *err)
       size_t len = strlen (err->message) + 1;
       gcc_assert (len <= error_buffer.allocated);
       memcpy (error_buffer.message, err->message, len);
-      gfc_free (err->message);
+      free (err->message);
     }
 }
 
@@ -1061,7 +1061,7 @@ void
 gfc_free_error (gfc_error_buf *err)
 {
   if (err->flag)
-    gfc_free (err->message);
+    free (err->message);
 }
 
 
index 287a2a24e3c4cbee6681ae4b772daff1bc401b18..1e316534388f7db6b1b20d4aef23186a1ee82d87 100644 (file)
@@ -421,7 +421,7 @@ free_expr0 (gfc_expr *e)
          break;
 
        case BT_CHARACTER:
-         gfc_free (e->value.character.string);
+         free (e->value.character.string);
          break;
 
        case BT_COMPLEX:
@@ -434,7 +434,7 @@ free_expr0 (gfc_expr *e)
 
       /* Free the representation.  */
       if (e->representation.string)
-       gfc_free (e->representation.string);
+       free (e->representation.string);
 
       break;
 
@@ -463,7 +463,7 @@ free_expr0 (gfc_expr *e)
       break;
 
     case EXPR_SUBSTRING:
-      gfc_free (e->value.character.string);
+      free (e->value.character.string);
       break;
 
     case EXPR_NULL:
@@ -479,7 +479,7 @@ free_expr0 (gfc_expr *e)
       for (n = 0; n < e->rank; n++)
        mpz_clear (e->shape[n]);
 
-      gfc_free (e->shape);
+      free (e->shape);
     }
 
   gfc_free_ref_list (e->ref);
@@ -496,7 +496,7 @@ gfc_free_expr (gfc_expr *e)
   if (e == NULL)
     return;
   free_expr0 (e);
-  gfc_free (e);
+  free (e);
 }
 
 
@@ -511,7 +511,7 @@ gfc_free_actual_arglist (gfc_actual_arglist *a1)
     {
       a2 = a1->next;
       gfc_free_expr (a1->expr);
-      gfc_free (a1);
+      free (a1);
       a1 = a2;
     }
 }
@@ -579,7 +579,7 @@ gfc_free_ref_list (gfc_ref *p)
          break;
        }
 
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -591,7 +591,7 @@ gfc_replace_expr (gfc_expr *dest, gfc_expr *src)
 {
   free_expr0 (dest);
   *dest = *src;
-  gfc_free (src);
+  free (src);
 }
 
 
@@ -640,7 +640,7 @@ gfc_copy_ref (gfc_ref *src)
     case REF_ARRAY:
       ar = gfc_copy_array_ref (&src->u.ar);
       dest->u.ar = *ar;
-      gfc_free (ar);
+      free (ar);
       break;
 
     case REF_COMPONENT:
@@ -1566,7 +1566,7 @@ find_substring_ref (gfc_expr *p, gfc_expr **newp)
     return FAILURE;
 
   *newp = gfc_copy_expr (p);
-  gfc_free ((*newp)->value.character.string);
+  free ((*newp)->value.character.string);
 
   end = (int) mpz_get_ui (p->ref->u.ss.end->value.integer);
   start = (int) mpz_get_ui (p->ref->u.ss.start->value.integer);
@@ -1840,7 +1840,7 @@ gfc_simplify_expr (gfc_expr *p, int type)
          memcpy (s, p->value.character.string + start,
                  (end - start) * sizeof (gfc_char_t));
          s[end - start + 1] = '\0';  /* TODO: C-style string.  */
-         gfc_free (p->value.character.string);
+         free (p->value.character.string);
          p->value.character.string = s;
          p->value.character.length = end - start;
          p->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
@@ -3594,7 +3594,7 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_expr *rvalue)
   else
     r = gfc_check_assign (&lvalue, rvalue, 1);
 
-  gfc_free (lvalue.symtree);
+  free (lvalue.symtree);
 
   if (r == FAILURE)
     return r;
index b8288a850438f16fb1b70c53bf18b7dac8d8dfa6..9d1cc3aac149977966e5c44b5f1888c1ee27aa92 100644 (file)
@@ -73,7 +73,7 @@ gfc_run_passes (gfc_namespace *ns)
 
       /* FIXME: The following should be XDELETEVEC(expr_array);
       but we cannot do that because it depends on free.  */
-      gfc_free (expr_array);
+      free (expr_array);
     }
 }
 
@@ -333,7 +333,7 @@ cfe_expr_0 (gfc_expr **e, int *walk_subtrees,
              if (gfc_option.warn_function_elimination)
                warn_function_elimination (*(expr_array[j]));
 
-             gfc_free (*(expr_array[j]));
+             free (*(expr_array[j]));
              *(expr_array[j]) = gfc_copy_expr (newvar);
            }
        }
@@ -501,7 +501,7 @@ strip_function_call (gfc_expr *e)
 
   /* Graft the argument expression onto the original function.  */
   *e = *e1;
-  gfc_free (e1);
+  free (e1);
 
 }
 
@@ -656,8 +656,8 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
                    return false;
                  else
                    {
-                     gfc_free (op1_left);
-                     gfc_free (op2_left);
+                     free (op1_left);
+                     free (op2_left);
                      if (firstarg)
                        {
                          firstarg->expr = op1_right;
@@ -674,8 +674,8 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
                }
              if (gfc_dep_compare_expr (op1_right, op2_right) == 0)
                {
-                 gfc_free (op1_right);
-                 gfc_free (op2_right);
+                 free (op1_right);
+                 free (op2_right);
                  if (firstarg)
                    {
                      firstarg->expr = op1_left;
@@ -734,8 +734,8 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
 
          /* Replace the expression by a constant expression.  The typespec
             and where remains the way it is.  */
-         gfc_free (op1);
-         gfc_free (op2);
+         free (op1);
+         free (op2);
          e->expr_type = EXPR_CONSTANT;
          e->value.logical = result;
          return true;
index 00fd24ac247bf4d0868d52a7fb7ae0da1b9b5772..872d4898ff668025fa8484daa644d682a366d3db 100644 (file)
@@ -87,7 +87,7 @@ gfc_free_interface (gfc_interface *intr)
   for (; intr; intr = next)
     {
       next = intr->next;
-      gfc_free (intr);
+      free (intr);
     }
 }
 
@@ -912,7 +912,7 @@ count_types_test (gfc_formal_arglist *f1, gfc_formal_arglist *f2)
       k++;
     }
 
-  gfc_free (arg);
+  free (arg);
 
   return rc;
 }
@@ -1147,7 +1147,7 @@ check_interface0 (gfc_interface *p, const char *interface_name)
            {
              /* Duplicate interface.  */
              qlast->next = q->next;
-             gfc_free (q);
+             free (q);
              q = qlast->next;
            }
        }
@@ -3142,8 +3142,8 @@ gfc_extend_expr (gfc_expr *e, bool *real_error)
 
       /* Don't use gfc_free_actual_arglist().  */
       if (actual->next != NULL)
-       gfc_free (actual->next);
-      gfc_free (actual);
+       free (actual->next);
+      free (actual);
 
       return FAILURE;
     }
@@ -3234,8 +3234,8 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns)
          return SUCCESS;
        }
 
-      gfc_free (actual->next);
-      gfc_free (actual);
+      free (actual->next);
+      free (actual);
       return FAILURE;
     }
 
@@ -3436,6 +3436,6 @@ gfc_free_formal_arglist (gfc_formal_arglist *p)
   for (; p; p = q)
     {
       q = p->next;
-      gfc_free (p);
+      free (p);
     }
 }
index 0fea0786e9ca55805b0ee1caf47603c15b3b22ad..c0eeb6dd297818170d105028161e521952326672 100644 (file)
@@ -3408,9 +3408,9 @@ gfc_intrinsic_init_1 (void)
 void
 gfc_intrinsic_done_1 (void)
 {
-  gfc_free (functions);
-  gfc_free (conversion);
-  gfc_free (char_conversions);
+  free (functions);
+  free (conversion);
+  free (char_conversions);
   gfc_free_namespace (gfc_intrinsic_namespace);
 }
 
@@ -4368,7 +4368,7 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag)
 
   *expr = *new_expr;
 
-  gfc_free (new_expr);
+  free (new_expr);
   expr->ts = *ts;
 
   if (gfc_is_constant_expr (expr->value.function.actual->expr)
@@ -4437,7 +4437,7 @@ gfc_convert_chartype (gfc_expr *expr, gfc_typespec *ts)
 
   *expr = *new_expr;
 
-  gfc_free (new_expr);
+  free (new_expr);
   expr->ts = *ts;
 
   if (gfc_is_constant_expr (expr->value.function.actual->expr)
index 3ce7e816b9a04007f0374393bf29c718133193c7..df9ee1e979357ef204ae67ff24bc851476b3ca68 100644 (file)
@@ -1640,7 +1640,7 @@ gfc_free_open (gfc_open *open)
   gfc_free_expr (open->convert);
   gfc_free_expr (open->asynchronous);
   gfc_free_expr (open->newunit);
-  gfc_free (open);
+  free (open);
 }
 
 
@@ -1764,7 +1764,7 @@ compare_to_allowed_values (const char *specifier, const char *allowed[],
       char *s = gfc_widechar_to_char (value, -1);
       gfc_warning ("%s specifier in %s statement at %C has invalid value '%s'",
                   specifier, statement, s);
-      gfc_free (s);
+      free (s);
       return 1;
     }
   else
@@ -1772,7 +1772,7 @@ compare_to_allowed_values (const char *specifier, const char *allowed[],
       char *s = gfc_widechar_to_char (value, -1);
       gfc_error ("%s specifier in %s statement at %C has invalid value '%s'",
                 specifier, statement, s);
-      gfc_free (s);
+      free (s);
       return 0;
     }
 }
@@ -2085,7 +2085,7 @@ gfc_match_open (void)
                                          -1);
          warn_or_error ("The STATUS specified in OPEN statement at %C is "
                         "'%s' and no FILE specifier is present", s);
-         gfc_free (s);
+         free (s);
        }
 
       /* F2003, 9.4.5: If the STATUS= specifier has the value SCRATCH,
@@ -2162,7 +2162,7 @@ gfc_free_close (gfc_close *close)
   gfc_free_expr (close->iomsg);
   gfc_free_expr (close->iostat);
   gfc_free_expr (close->status);
-  gfc_free (close);
+  free (close);
 }
 
 
@@ -2306,7 +2306,7 @@ gfc_free_filepos (gfc_filepos *fp)
   gfc_free_expr (fp->unit);
   gfc_free_expr (fp->iomsg);
   gfc_free_expr (fp->iostat);
-  gfc_free (fp);
+  free (fp);
 }
 
 
@@ -2740,7 +2740,7 @@ gfc_free_dt (gfc_dt *dt)
   gfc_free_expr (dt->pos);
   gfc_free_expr (dt->dt_io_kind);
   /* dt->extra_comma is a link to dt_io_kind if it is set.  */
-  gfc_free (dt);
+  free (dt);
 }
 
 
@@ -3822,7 +3822,7 @@ gfc_free_inquire (gfc_inquire *inquire)
   gfc_free_expr (inquire->sign);
   gfc_free_expr (inquire->size);
   gfc_free_expr (inquire->round);
-  gfc_free (inquire);
+  free (inquire);
 }
 
 
index d2d9f5f934b46527bac85e3bb9880b0f2ff2cec3..f1c953adcbe40ec4b413a78a3135d22d7bd7fb26 100644 (file)
@@ -1715,7 +1715,7 @@ gfc_free_iterator (gfc_iterator *iter, int flag)
   gfc_free_expr (iter->step);
 
   if (flag)
-    gfc_free (iter);
+    free (iter);
 }
 
 
@@ -1868,7 +1868,7 @@ gfc_match_associate (void)
       continue;
 
 assocListError:
-      gfc_free (newAssoc);
+      free (newAssoc);
       goto error;
     }
   if (gfc_match_char (')') != MATCH_YES)
@@ -2710,7 +2710,7 @@ gfc_free_alloc_list (gfc_alloc *p)
     {
       q = p->next;
       gfc_free_expr (p->expr);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -3967,7 +3967,7 @@ gfc_free_namelist (gfc_namelist *name)
   for (; name; name = n)
     {
       n = name->next;
-      gfc_free (name);
+      free (name);
     }
 }
 
@@ -4105,7 +4105,7 @@ gfc_free_equiv_until (gfc_equiv *eq, gfc_equiv *stop)
   gfc_free_equiv (eq->eq);
   gfc_free_equiv_until (eq->next, stop);
   gfc_free_expr (eq->expr);
-  gfc_free (eq);
+  free (eq);
 }
 
 
@@ -4368,7 +4368,7 @@ free_case (gfc_case *p)
     p->high = NULL;
   gfc_free_expr (p->low);
   gfc_free_expr (p->high);
-  gfc_free (p);
+  free (p);
 }
 
 
@@ -5005,7 +5005,7 @@ gfc_free_forall_iterator (gfc_forall_iterator *iter)
       gfc_free_expr (iter->start);
       gfc_free_expr (iter->end);
       gfc_free_expr (iter->stride);
-      gfc_free (iter);
+      free (iter);
       iter = next;
     }
 }
index 4dd186f6ad389d36b4a3f2abe9b3130d4ed82821..76dd2ef3f87530aedf6ad3a386ef1d3635d02781 100644 (file)
@@ -1,5 +1,5 @@
 /* Miscellaneous stuff that doesn't fit anywhere else.
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Andy Vaught
 
index 36701b427f94fae8317471998aae6cf993a08873..e97354f713f29980600de126ca94b822525132c7 100644 (file)
@@ -229,7 +229,7 @@ free_pi_tree (pointer_info *p)
   free_pi_tree (p->left);
   free_pi_tree (p->right);
 
-  gfc_free (p);
+  free (p);
 }
 
 
@@ -424,7 +424,7 @@ resolve_fixups (fixup_t *f, void *gp)
     {
       next = f->next;
       *(f->pointer) = gp;
-      gfc_free (f);
+      free (f);
     }
 }
 
@@ -496,7 +496,7 @@ free_rename (void)
   for (; gfc_rename_list; gfc_rename_list = next)
     {
       next = gfc_rename_list->next;
-      gfc_free (gfc_rename_list);
+      free (gfc_rename_list);
     }
 }
 
@@ -891,7 +891,7 @@ free_true_name (true_name *t)
   free_true_name (t->left);
   free_true_name (t->right);
 
-  gfc_free (t);
+  free (t);
 }
 
 
@@ -1225,7 +1225,7 @@ peek_atom (void)
 
   a = parse_atom ();
   if (a == ATOM_STRING)
-    gfc_free (atom_string);
+    free (atom_string);
 
   set_module_locus (&m);
   return a;
@@ -1609,7 +1609,7 @@ mio_allocated_wide_string (const gfc_char_t *s, const size_t length)
     {
       char *quoted = quote_string (s, length);
       write_atom (ATOM_STRING, quoted);
-      gfc_free (quoted);
+      free (quoted);
       return s;
     }
   else
@@ -1618,7 +1618,7 @@ mio_allocated_wide_string (const gfc_char_t *s, const size_t length)
 
       require_atom (ATOM_STRING);
       unquoted = unquote_string (atom_string);
-      gfc_free (atom_string);
+      free (atom_string);
       return unquoted;
     }
 }
@@ -1644,7 +1644,7 @@ mio_pool_string (const char **stringp)
     {
       require_atom (ATOM_STRING);
       *stringp = atom_string[0] == '\0' ? NULL : gfc_get_string (atom_string);
-      gfc_free (atom_string);
+      free (atom_string);
     }
 }
 
@@ -1661,7 +1661,7 @@ mio_internal_string (char *string)
     {
       require_atom (ATOM_STRING);
       strcpy (string, atom_string);
-      gfc_free (atom_string);
+      free (atom_string);
     }
 }
 
@@ -2813,13 +2813,13 @@ mio_gmp_integer (mpz_t *integer)
       if (mpz_set_str (*integer, atom_string, 10))
        bad_module ("Error converting integer");
 
-      gfc_free (atom_string);
+      free (atom_string);
     }
   else
     {
       p = mpz_get_str (NULL, 10, *integer);
       write_atom (ATOM_STRING, p);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -2837,7 +2837,7 @@ mio_gmp_real (mpfr_t *real)
 
       mpfr_init (*real);
       mpfr_set_str (*real, atom_string, 16, GFC_RND_MODE);
-      gfc_free (atom_string);
+      free (atom_string);
     }
   else
     {
@@ -2846,7 +2846,7 @@ mio_gmp_real (mpfr_t *real)
       if (mpfr_nan_p (*real) || mpfr_inf_p (*real))
        {
          write_atom (ATOM_STRING, p);
-         gfc_free (p);
+         free (p);
          return;
        }
 
@@ -2864,8 +2864,8 @@ mio_gmp_real (mpfr_t *real)
 
       write_atom (ATOM_STRING, atom_string);
 
-      gfc_free (atom_string);
-      gfc_free (p);
+      free (atom_string);
+      free (p);
     }
 }
 
@@ -3128,7 +3128,7 @@ mio_expr (gfc_expr **ep)
        {
          require_atom (ATOM_STRING);
          e->value.function.name = gfc_get_string (atom_string);
-         gfc_free (atom_string);
+         free (atom_string);
 
          mio_integer (&flag);
          if (flag)
@@ -3137,7 +3137,7 @@ mio_expr (gfc_expr **ep)
            {
              require_atom (ATOM_STRING);
              e->value.function.isym = gfc_find_function (atom_string);
-             gfc_free (atom_string);
+             free (atom_string);
            }
        }
 
@@ -3419,7 +3419,7 @@ mio_typebound_proc (gfc_typebound_proc** proc)
              require_atom (ATOM_STRING);
              sym_root = &current_f2k_derived->tb_sym_root;
              g->specific_st = gfc_get_tbp_symtree (sym_root, atom_string);
-             gfc_free (atom_string);
+             free (atom_string);
 
              g->next = (*proc)->u.generic;
              (*proc)->u.generic = g;
@@ -3470,7 +3470,7 @@ mio_full_typebound_tree (gfc_symtree** root)
 
          require_atom (ATOM_STRING);
          st = gfc_get_tbp_symtree (root, atom_string);
-         gfc_free (atom_string);
+         free (atom_string);
 
          mio_typebound_symtree (st);
        }
@@ -3753,7 +3753,7 @@ skip_list (void)
          break;
 
        case ATOM_STRING:
-         gfc_free (atom_string);
+         free (atom_string);
          break;
 
        case ATOM_NAME:
@@ -4061,7 +4061,7 @@ load_equiv (void)
          {
            head = eq->eq;
            gfc_free_expr (eq->expr);
-           gfc_free (eq);
+           free (eq);
          }
       }
 
@@ -4663,7 +4663,7 @@ free_written_common (struct written_common *w)
   if (w->right)
     free_written_common (w->right);
 
-  gfc_free (w);
+  free (w);
 }
 
 /* Write a common block to the module -- recursive helper function.  */
@@ -5742,7 +5742,7 @@ gfc_use_module (void)
                               MOD_VERSION, filename);
            }
 
-         gfc_free (atom_string);
+         free (atom_string);
        }
 
       if (c == '\n')
@@ -5789,10 +5789,10 @@ gfc_free_use_stmts (gfc_use_list *use_stmts)
       for (; use_stmts->rename; use_stmts->rename = next_rename)
        {
          next_rename = use_stmts->rename->next;
-         gfc_free (use_stmts->rename);
+         free (use_stmts->rename);
        }
       next = use_stmts->next;
-      gfc_free (use_stmts);
+      free (use_stmts);
     }
 }
 
index 2b70c69a9845299b1119bb9d18cc02fe1207fab3..69a6bca352e6d314f33ae14b1af57c7b87ab6ad7 100644 (file)
@@ -70,7 +70,7 @@ gfc_free_omp_clauses (gfc_omp_clauses *c)
   gfc_free_expr (c->chunk_size);
   for (i = 0; i < OMP_LIST_NUM; i++)
     gfc_free_namelist (c->lists[i]);
-  gfc_free (c);
+  free (c);
 }
 
 /* Match a variable/common block list and construct a namelist from it.  */
index 5e173088d941b48b5cfe0fd2cc210b50b1cb04d4..a4d9a66062c11aaa56492e1dae334b0df0e91ff1 100644 (file)
@@ -331,7 +331,7 @@ gfc_post_options (const char **pfilename)
     gfc_add_include_path (".", true, true);
 
   if (canon_source_file != gfc_source_file)
-    gfc_free (CONST_CAST (char *, canon_source_file));
+    free (CONST_CAST (char *, canon_source_file));
 
   /* Decide which form the file will be read in as.  */
 
index 7fc3dca43be241157abb6dd95804e7b7fd49e415..c09589b88e01fa1f2d29d9c938bb239fb29afe4e 100644 (file)
@@ -2925,7 +2925,7 @@ select_type_pop (void)
 {
   gfc_select_type_stack *old = select_type_stack;
   select_type_stack = old->prev;
-  gfc_free (old);
+  free (old);
 }
 
 
@@ -3576,7 +3576,7 @@ parse_omp_structured_block (gfc_statement omp_st, bool workshare_stmts_only)
              && strcmp (cp->ext.omp_name, new_st.ext.omp_name) != 0))
        gfc_error ("Name after !$omp critical and !$omp end critical does "
                   "not match at %C");
-      gfc_free (CONST_CAST (char *, new_st.ext.omp_name));
+      free (CONST_CAST (char *, new_st.ext.omp_name));
       break;
     case EXEC_OMP_END_SINGLE:
       cp->ext.omp_clauses->lists[OMP_LIST_COPYPRIVATE]
index a121999317aea34dcb99fb8ac8f7a76a44f0c316..15cb9a47c5f5710172a7852488547b8a56dff7f2 100644 (file)
@@ -2179,9 +2179,9 @@ gfc_structure_ctor_component;
 static void
 gfc_free_structure_ctor_component (gfc_structure_ctor_component *comp)
 {
-  gfc_free (comp->name);
+  free (comp->name);
   gfc_free_expr (comp->val);
-  gfc_free (comp);
+  free (comp);
 }
 
 
index 01999e5f250846573d460c1d2a573346c895083e..09cfe78de78047e2f9cb20d8bbf76d95633c2824 100644 (file)
@@ -1091,7 +1091,7 @@ resolve_structure_cons (gfc_expr *expr, int init)
                    cl2->next = cl->next;
 
                  gfc_free_expr (cl->length);
-                 gfc_free (cl);
+                 free (cl);
                }
 
              cons->expr->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
@@ -5194,7 +5194,7 @@ check_host_association (gfc_expr *e)
              for (n = 0; n < e->rank; n++)
                mpz_clear (e->shape[n]);
 
-             gfc_free (e->shape);
+             free (e->shape);
            }
 
          /* Give the expression the right symtree!  */
@@ -8643,7 +8643,7 @@ gfc_resolve_forall (gfc_code *code, gfc_namespace *ns, int forall_save)
       gcc_assert (forall_save == 0);
 
       /* VAR_EXPR is not needed any more.  */
-      gfc_free (var_expr);
+      free (var_expr);
       total_var = 0;
     }
 }
@@ -13184,7 +13184,7 @@ resolve_equivalence (gfc_equiv *eq)
                  e->ts.u.cl = NULL;
                }
              ref = ref->next;
-             gfc_free (mem);
+             free (mem);
            }
 
          /* Any further ref is an error.  */
index 8478b1013df9c30d24eec16b2d05cdd3d44ef40c..7f99eb8b9133daffd8b82e2cd2e3d88c07b32dcb 100644 (file)
@@ -288,15 +288,15 @@ gfc_scanner_done_1 (void)
   while(line_head != NULL) 
     {
       lb = line_head->next;
-      gfc_free(line_head);
+      free (line_head);
       line_head = lb;
     }
      
   while(file_head != NULL) 
     {
       f = file_head->next;
-      gfc_free(file_head->filename);
-      gfc_free(file_head);
+      free (file_head->filename);
+      free (file_head);
       file_head = f;    
     }
 }
@@ -371,19 +371,19 @@ gfc_release_include_path (void)
     {
       p = include_dirs;
       include_dirs = include_dirs->next;
-      gfc_free (p->path);
-      gfc_free (p);
+      free (p->path);
+      free (p);
     }
 
   while (intrinsic_modules_dirs != NULL)
     {
       p = intrinsic_modules_dirs;
       intrinsic_modules_dirs = intrinsic_modules_dirs->next;
-      gfc_free (p->path);
-      gfc_free (p);
+      free (p->path);
+      free (p);
     }
 
-  gfc_free (gfc_option.module_dir);
+  free (gfc_option.module_dir);
 }
 
 
@@ -659,7 +659,7 @@ gfc_define_undef_line (void)
       tmp = gfc_widechar_to_char (&gfc_current_locus.nextc[8], -1);
       (*debug_hooks->define) (gfc_linebuf_linenum (gfc_current_locus.lb),
                              tmp);
-      gfc_free (tmp);
+      free (tmp);
     }
 
   if (wide_strncmp (gfc_current_locus.nextc, "#undef ", 7) == 0)
@@ -667,7 +667,7 @@ gfc_define_undef_line (void)
       tmp = gfc_widechar_to_char (&gfc_current_locus.nextc[7], -1);
       (*debug_hooks->undef) (gfc_linebuf_linenum (gfc_current_locus.lb),
                             tmp);
-      gfc_free (tmp);
+      free (tmp);
     }
 
   /* Skip the rest of the line.  */
@@ -1760,8 +1760,8 @@ preprocessor_line (gfc_char_t *c)
                           current_file->filename, current_file->line,
                           filename);
          if (unescape)
-           gfc_free (wide_filename);
-         gfc_free (filename);
+           free (wide_filename);
+         free (filename);
          return;
        }
 
@@ -1785,8 +1785,8 @@ preprocessor_line (gfc_char_t *c)
   /* Set new line number.  */
   current_file->line = line;
   if (unescape)
-    gfc_free (wide_filename);
-  gfc_free (filename);
+    free (wide_filename);
+  free (filename);
   return;
 
  bad_cpp_line:
@@ -1870,7 +1870,7 @@ include_line (gfc_char_t *line)
   if (load_file (filename, NULL, false) == FAILURE)
     exit (FATAL_EXIT_CODE);
 
-  gfc_free (filename);
+  free (filename);
   return true;
 }
 
@@ -1939,12 +1939,12 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
   if (initial && gfc_src_preprocessor_lines[0])
     {
       preprocessor_line (gfc_src_preprocessor_lines[0]);
-      gfc_free (gfc_src_preprocessor_lines[0]);
+      free (gfc_src_preprocessor_lines[0]);
       gfc_src_preprocessor_lines[0] = NULL;
       if (gfc_src_preprocessor_lines[1])
        {
          preprocessor_line (gfc_src_preprocessor_lines[1]);
-         gfc_free (gfc_src_preprocessor_lines[1]);
+         free (gfc_src_preprocessor_lines[1]);
          gfc_src_preprocessor_lines[1] = NULL;
        }
     }
@@ -1975,7 +1975,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
          gfc_char_t *new_char = gfc_get_wide_string (line_len);
 
          wide_strcpy (new_char, &line[n]);
-         gfc_free (line);
+         free (line);
          line = new_char;
          len -= n;
        }
@@ -2033,7 +2033,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
     }
 
   /* Release the line buffer allocated in load_line.  */
-  gfc_free (line);
+  free (line);
 
   fclose (input);
 
@@ -2145,7 +2145,7 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
 
   tmp = gfc_widechar_to_char (&gfc_src_preprocessor_lines[0][5], -1);
   filename = unescape_filename (tmp);
-  gfc_free (tmp);
+  free (tmp);
   if (filename == NULL)
     return NULL;
 
@@ -2162,14 +2162,14 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
 
   tmp = gfc_widechar_to_char (&gfc_src_preprocessor_lines[1][5], -1);
   dirname = unescape_filename (tmp);
-  gfc_free (tmp);
+  free (tmp);
   if (dirname == NULL)
     return filename;
 
   len = strlen (dirname);
   if (len < 3 || dirname[len - 1] != '/' || dirname[len - 2] != '/')
     {
-      gfc_free (dirname);
+      free (dirname);
       return filename;
     }
   dirname[len - 2] = '\0';
@@ -2185,6 +2185,6 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
       *canon_source_file = p;
     }
 
-  gfc_free (dirname);
+  free (dirname);
   return filename;
 }
index 784f27fc7931c0ea795fa839c5d2fe361262dfe1..c2ece959a8f891c3ea2f618f6f1361441c9f1b54 100644 (file)
@@ -616,8 +616,8 @@ simplify_transformation_to_array (gfc_expr *result, gfc_expr *array, gfc_expr *d
       result_ctor = gfc_constructor_next (result_ctor);
     }
 
-  gfc_free (arrayvec);
-  gfc_free (resultvec);
+  free (arrayvec);
+  free (resultvec);
   return result;
 }
 
@@ -2595,7 +2595,7 @@ gfc_simplify_ibits (gfc_expr *x, gfc_expr *y, gfc_expr *z)
        gfc_internal_error ("IBITS: Bad bit");
     }
 
-  gfc_free (bits);
+  free (bits);
 
   convert_mpz_to_signed (result->value.integer,
                         gfc_integer_kinds[k].bit_size);
@@ -3087,7 +3087,7 @@ simplify_shift (gfc_expr *e, gfc_expr *s, const char *name,
     }
 
   convert_mpz_to_signed (result->value.integer, bitsize);
-  gfc_free (bits);
+  free (bits);
 
   return result;
 }
@@ -3246,7 +3246,7 @@ gfc_simplify_ishftc (gfc_expr *e, gfc_expr *s, gfc_expr *sz)
 
   convert_mpz_to_signed (result->value.integer, isize);
 
-  gfc_free (bits);
+  free (bits);
   return result;
 }
 
@@ -4076,12 +4076,12 @@ min_max_choose (gfc_expr *arg, gfc_expr *extremum, int sign)
                               LENGTH(arg) - LENGTH(extremum));
            STRING(extremum)[LENGTH(arg)] = '\0';  /* For debugger  */
            LENGTH(extremum) = LENGTH(arg);
-           gfc_free (tmp);
+           free (tmp);
          }
 
        if (gfc_compare_string (arg, extremum) * sign > 0)
          {
-           gfc_free (STRING(extremum));
+           free (STRING(extremum));
            STRING(extremum) = gfc_get_wide_string (LENGTH(extremum) + 1);
            memcpy (STRING(extremum), STRING(arg),
                      LENGTH(arg) * sizeof (gfc_char_t));
@@ -6799,7 +6799,7 @@ gfc_simplify_compiler_options (void)
   str = gfc_get_option_string ();
   result = gfc_get_character_expr (gfc_default_character_kind,
                                   &gfc_current_locus, str, strlen (str));
-  gfc_free (str);
+  free (str);
   return result;
 }
 
index 28d69b929834b9888dd6c694e9b722322723f066..6f8a234c50d2e645fe23c17265756f879585ec73 100644 (file)
@@ -193,7 +193,7 @@ gfc_free_statement (gfc_code *p)
       break;
 
     case EXEC_OMP_CRITICAL:
-      gfc_free (CONST_CAST (char *, p->ext.omp_name));
+      free (CONST_CAST (char *, p->ext.omp_name));
       break;
 
     case EXEC_OMP_FLUSH:
@@ -228,7 +228,7 @@ gfc_free_statements (gfc_code *p)
       if (p->block)
        gfc_free_statements (p->block);
       gfc_free_statement (p);
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -242,5 +242,5 @@ gfc_free_association_list (gfc_association_list* assoc)
     return;
 
   gfc_free_association_list (assoc->next);
-  gfc_free (assoc);
+  free (assoc);
 }
index 71aa518ee31b980bc036746bd600d54f3f2658c7..4b4f75fe827f19c6ecbbcaa1d85765bf72fa6468 100644 (file)
@@ -2060,7 +2060,7 @@ free_components (gfc_component *p)
       gfc_free_formal_arglist (p->formal);
       gfc_free_namespace (p->formal_ns);
 
-      gfc_free (p);
+      free (p);
     }
 }
 
@@ -2096,7 +2096,7 @@ gfc_free_st_label (gfc_st_label *label)
   if (label->format != NULL)
     gfc_free_expr (label->format);
 
-  gfc_free (label);
+  free (label);
 }
 
 
@@ -2114,7 +2114,7 @@ free_st_labels (gfc_st_label *label)
   
   if (label->format != NULL)
     gfc_free_expr (label->format);
-  gfc_free (label);
+  free (label);
 }
 
 
@@ -2375,7 +2375,7 @@ gfc_delete_symtree (gfc_symtree **root, const char *name)
   st.name = gfc_get_string (name);
   gfc_delete_bbt (root, &st, compare_symtree);
 
-  gfc_free (st0);
+  free (st0);
 }
 
 
@@ -2481,7 +2481,7 @@ gfc_free_symbol (gfc_symbol *sym)
 
   gfc_free_namespace (sym->f2k_derived);
 
-  gfc_free (sym);
+  free (sym);
 }
 
 
@@ -2918,7 +2918,7 @@ gfc_undo_symbols (void)
          p->formal = old->formal;
        }
 
-      gfc_free (p->old_symbol);
+      free (p->old_symbol);
       p->old_symbol = NULL;
       p->tlink = NULL;
     }
@@ -2929,7 +2929,7 @@ gfc_undo_symbols (void)
     {
       tbq = tbp->next;
       /* Procedure is already marked `error' by default.  */
-      gfc_free (tbp);
+      free (tbp);
     }
   tentative_tbp_list = NULL;
 }
@@ -2957,7 +2957,7 @@ free_old_symbol (gfc_symbol *sym)
   if (sym->old_symbol->formal != sym->formal)
     gfc_free_formal_arglist (sym->old_symbol->formal);
 
-  gfc_free (sym->old_symbol);
+  free (sym->old_symbol);
   sym->old_symbol = NULL;
 }
 
@@ -2985,7 +2985,7 @@ gfc_commit_symbols (void)
     {
       tbq = tbp->next;
       tbp->proc->error = 0;
-      gfc_free (tbp);
+      free (tbp);
     }
   tentative_tbp_list = NULL;
 }
@@ -3033,7 +3033,7 @@ free_tb_tree (gfc_symtree *t)
   /* TODO: Free type-bound procedure structs themselves; probably needs some
      sort of ref-counting mechanism.  */
 
-  gfc_free (t);
+  free (t);
 }
 
 
@@ -3049,7 +3049,7 @@ free_common_tree (gfc_symtree * common_tree)
   free_common_tree (common_tree->left);
   free_common_tree (common_tree->right);
 
-  gfc_free (common_tree);
+  free (common_tree);
 }  
 
 
@@ -3066,8 +3066,8 @@ free_uop_tree (gfc_symtree *uop_tree)
   free_uop_tree (uop_tree->right);
 
   gfc_free_interface (uop_tree->n.uop->op);
-  gfc_free (uop_tree->n.uop);
-  gfc_free (uop_tree);
+  free (uop_tree->n.uop);
+  free (uop_tree);
 }
 
 
@@ -3084,7 +3084,7 @@ free_sym_tree (gfc_symtree *sym_tree)
   free_sym_tree (sym_tree->right);
 
   gfc_release_symbol (sym_tree->n.sym);
-  gfc_free (sym_tree);
+  free (sym_tree);
 }
 
 
@@ -3098,7 +3098,7 @@ gfc_free_dt_list (void)
   for (dt = gfc_derived_types; dt; dt = n)
     {
       n = dt->next;
-      gfc_free (dt);
+      free (dt);
     }
 
   gfc_derived_types = NULL;
@@ -3113,7 +3113,7 @@ gfc_free_equiv_infos (gfc_equiv_info *s)
   if (s == NULL)
     return;
   gfc_free_equiv_infos (s->next);
-  gfc_free (s);
+  free (s);
 }
 
 
@@ -3126,7 +3126,7 @@ gfc_free_equiv_lists (gfc_equiv_list *l)
     return;
   gfc_free_equiv_lists (l->next);
   gfc_free_equiv_infos (l->equiv);
-  gfc_free (l);
+  free (l);
 }
 
 
@@ -3138,7 +3138,7 @@ gfc_free_finalizer (gfc_finalizer* el)
   if (el)
     {
       gfc_release_symbol (el->proc_sym);
-      gfc_free (el);
+      free (el);
     }
 }
 
@@ -3204,7 +3204,7 @@ void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end)
 
       cl2 = cl->next;
       gfc_free_expr (cl->length);
-      gfc_free (cl);
+      free (cl);
     }
 }
 
@@ -3220,7 +3220,7 @@ free_entry_list (gfc_entry_list *el)
     return;
 
   next = el->next;
-  gfc_free (el);
+  free (el);
   free_entry_list (next);
 }
 
@@ -3264,7 +3264,7 @@ gfc_free_namespace (gfc_namespace *ns)
 
   gfc_free_data (ns->data);
   p = ns->contained;
-  gfc_free (ns);
+  free (ns);
 
   /* Recursively free any contained namespaces.  */
   while (p != NULL)
index 5293fec225b9e5c9340725e3bc957d11e2307fdc..20138e2603741230946cbcc3ab091a59ccc50d3b 100644 (file)
@@ -486,7 +486,7 @@ gfc_free_ss (gfc_ss * ss)
       break;
     }
 
-  gfc_free (ss);
+  free (ss);
 }
 
 
@@ -2430,7 +2430,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
                               fold_convert (long_integer_type_node, index),
                               fold_convert (long_integer_type_node, tmp_lo),
                               fold_convert (long_integer_type_node, tmp_up));
-      gfc_free (msg);
+      free (msg);
     }
   else
     {
@@ -2448,7 +2448,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
       gfc_trans_runtime_check (true, false, fault, &se->pre, where, msg,
                               fold_convert (long_integer_type_node, index),
                               fold_convert (long_integer_type_node, tmp_lo));
-      gfc_free (msg);
+      free (msg);
     }
 
   return index;
@@ -2669,7 +2669,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym,
                                   fold_convert (long_integer_type_node,
                                                 indexse.expr),
                                   fold_convert (long_integer_type_node, tmp));
-         gfc_free (msg);
+         free (msg);
 
          /* Upper bound, but not for the last dimension of assumed-size
             arrays.  */
@@ -2693,7 +2693,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym,
                                   fold_convert (long_integer_type_node,
                                                 indexse.expr),
                                   fold_convert (long_integer_type_node, tmp));
-             gfc_free (msg);
+             free (msg);
            }
        }
 
@@ -3315,7 +3315,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                        "of array '%s'", dim + 1, ss->expr->symtree->name);
              gfc_trans_runtime_check (true, false, tmp, &inner,
                                       &ss->expr->where, msg);
-             gfc_free (msg);
+             free (msg);
 
              desc = ss->data.info.descriptor;
 
@@ -3382,7 +3382,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                     fold_convert (long_integer_type_node, info->start[dim]),
                     fold_convert (long_integer_type_node, lbound),
                     fold_convert (long_integer_type_node, ubound));
-                 gfc_free (msg);
+                 free (msg);
                }
              else
                {
@@ -3398,7 +3398,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                                           &ss->expr->where, msg,
                     fold_convert (long_integer_type_node, info->start[dim]),
                     fold_convert (long_integer_type_node, lbound));
-                 gfc_free (msg);
+                 free (msg);
                }
              
              /* Compute the last element of the range, which is not
@@ -3436,7 +3436,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                     fold_convert (long_integer_type_node, tmp),
                     fold_convert (long_integer_type_node, ubound), 
                     fold_convert (long_integer_type_node, lbound));
-                 gfc_free (msg);
+                 free (msg);
                }
              else
                {
@@ -3447,7 +3447,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                                           &ss->expr->where, msg,
                     fold_convert (long_integer_type_node, tmp),
                     fold_convert (long_integer_type_node, lbound));
-                 gfc_free (msg);
+                 free (msg);
                }
 
              /* Check the section sizes match.  */
@@ -3478,7 +3478,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
                        fold_convert (long_integer_type_node, tmp),
                        fold_convert (long_integer_type_node, size[n]));
 
-                 gfc_free (msg);
+                 free (msg);
                }
              else
                size[n] = gfc_evaluate_now (tmp, &inner);
@@ -5127,7 +5127,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc,
                        fold_convert (long_integer_type_node, temp),
                        fold_convert (long_integer_type_node, stride2));
 
-             gfc_free (msg);
+             free (msg);
            }
        }
       else
@@ -6310,7 +6310,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, bool g77,
 
          gfc_trans_runtime_check (false, true, tmp, &se->pre,
                                   &expr->where, msg);
-         gfc_free (msg);
+         free (msg);
        }
 
       gfc_start_block (&block);
index ad4ef066d89a89d826c12615a088ba37310e8a3a..a2b260546653717abdd1a0006ab8f4d19415c067 100644 (file)
@@ -521,8 +521,8 @@ get_init_field (segment_info *head, tree union_type, tree *field_init,
   for (i = 0; i < length; i++)
     CONSTRUCTOR_APPEND_ELT (v, NULL, build_int_cst (type, data[i]));
 
-  gfc_free (data);
-  gfc_free (chk);
+  free (data);
+  free (chk);
 
   /* Build a char[length] array to hold the initializers.  Much of what
      follows is borrowed from build_field, above.  */
@@ -720,7 +720,7 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
       s->sym->backend_decl = var_decl;
 
       next_s = s->next;
-      gfc_free (s);
+      free (s);
     }
 }
 
index 3d8d4ef8e7d4a5f7d474d3e4fb58f14157765f8c..30739d8305f4a080be656786a06e9279e9582b92 100644 (file)
@@ -102,7 +102,7 @@ gfc_build_wide_string_const (int kind, int length, const gfc_char_t *string)
   gfc_encode_character (kind, length, string, (unsigned char *) s, size);
 
   str = build_string (size, s);
-  gfc_free (s);
+  free (s);
 
   len = build_int_cst (NULL_TREE, length);
   TREE_TYPE (str) =
@@ -164,7 +164,7 @@ gfc_conv_string_init (tree length, gfc_expr * expr)
   str = gfc_build_wide_string_const (expr->ts.kind, len, s);
 
   if (free_s)
-    gfc_free (s);
+    free (s);
 
   return str;
 }
index 866720f96a497ac0c8391aef00f2e5ec1c6777d0..29010467454d2e0636873f8f0079c5b92875f0f4 100644 (file)
@@ -4906,7 +4906,7 @@ gfc_generate_function_code (gfc_namespace * ns)
       gfc_trans_runtime_check (true, false, recurcheckvar, &init,
                               &sym->declared_at, msg);
       gfc_add_modify (&init, recurcheckvar, boolean_true_node);
-      gfc_free (msg);
+      free (msg);
     }
 
   /* Now generate the code for the body of this function.  */
index 92a0fe9744eb738a2ee9a81020530de068a4bd19..af19d32867a37e49767437631b0dbfcb67f6efa5 100644 (file)
@@ -449,7 +449,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind,
       gfc_trans_runtime_check (true, false, fault, &se->pre, where, msg,
                               fold_convert (long_integer_type_node,
                                             start.expr));
-      gfc_free (msg);
+      free (msg);
 
       /* Check upper bound.  */
       fault = fold_build2_loc (input_location, GT_EXPR, boolean_type_node,
@@ -466,7 +466,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind,
                               fold_convert (long_integer_type_node, end.expr),
                               fold_convert (long_integer_type_node,
                                             se->string_length));
-      gfc_free (msg);
+      free (msg);
     }
 
   /* If the start and end expressions are equal, the length is one.  */
@@ -1736,14 +1736,14 @@ gfc_free_interface_mapping (gfc_interface_mapping * mapping)
       sym->new_sym->n.sym->formal = NULL;
       gfc_free_symbol (sym->new_sym->n.sym);
       gfc_free_expr (sym->expr);
-      gfc_free (sym->new_sym);
-      gfc_free (sym);
+      free (sym->new_sym);
+      free (sym);
     }
   for (cl = mapping->charlens; cl; cl = nextcl)
     {
       nextcl = cl->next;
       gfc_free_expr (cl->length);
-      gfc_free (cl);
+      free (cl);
     }
 }
 
@@ -3335,7 +3335,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
  
          gfc_trans_runtime_check (true, false, cond, &se->pre, &e->where,
                                   msg);
-         gfc_free (msg);
+         free (msg);
         }
       end_pointer_check:
 
@@ -4042,7 +4042,7 @@ gfc_conv_statement_function (gfc_se * se, gfc_expr * expr)
   /* Restore the original variables.  */
   for (fargs = sym->formal, n = 0; fargs; fargs = fargs->next, n++)
     gfc_restore_sym (fargs->sym, &saved_vars[n]);
-  gfc_free (saved_vars);
+  free (saved_vars);
 }
 
 
@@ -4311,7 +4311,7 @@ gfc_trans_subarray_assign (tree dest, gfc_component * cm, gfc_expr * expr)
 
   for (n = 0; n < cm->as->rank; n++)
     mpz_clear (lss->shape[n]);
-  gfc_free (lss->shape);
+  free (lss->shape);
 
   gfc_cleanup_loop (&loop);
 
index aec670d3b0452c5e86bcc3cd2f25c92ceeb0ca02..180aba18b1764d6be76f7fdcdb8acc4c2ff4e1f3 100644 (file)
@@ -4215,7 +4215,7 @@ conv_generic_with_optional_char_arg (gfc_se* se, gfc_expr* expr,
   sym = gfc_get_symbol_for_expr (expr);
   gfc_conv_procedure_call (se, sym, expr->value.function.actual, expr,
                          append_args);
-  gfc_free (sym);
+  free (sym);
 }
 
 
index 883ec5c95c130ae254554023f2e500d29263ad4b..a9ad4a68cae27a602114dd8a3612645441c813b8 100644 (file)
@@ -252,7 +252,7 @@ gfc_trans_io_runtime_check (tree cond, tree var, int error_code,
   asprintf (&message, "%s", _(msgid));
   arg3 = gfc_build_addr_expr (pchar_type_node,
                              gfc_build_localized_cstring_const (message));
-  gfc_free(message);
+  free (message);
   
   tmp = build_call_expr_loc (input_location,
                         gfor_fndecl_generate_error, 3, arg1, arg2, arg3);
@@ -711,7 +711,7 @@ set_string (stmtblock_t * block, stmtblock_t * postblock, tree var,
               "label", e->symtree->name);
       gfc_trans_runtime_check (true, false, cond, &se.pre, &e->where, msg,
                               fold_convert (long_integer_type_node, tmp));
-      gfc_free (msg);
+      free (msg);
 
       gfc_add_modify (&se.pre, io,
                 fold_convert (TREE_TYPE (io), GFC_DECL_ASSIGN_ADDR (se.expr)));
@@ -1627,7 +1627,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name,
          transfer_namelist_element (block,
                                     full_name,
                                     NULL, cmp, expr);
-         gfc_free (full_name);
+         free (full_name);
        }
     }
 }
@@ -2001,7 +2001,7 @@ transfer_array_component (tree expr, gfc_component * cm, locus * where)
 
   for (n = 0; n < cm->as->rank; n++)
     mpz_clear (ss->shape[n]);
-  gfc_free (ss->shape);
+  free (ss->shape);
 
   gfc_cleanup_loop (&loop);
 
index 53eb99990bc4e8618b0ef0a039833b1c2cda7c8c..d709fdf4c4e1a5309bdcf9261e7f123b9e582c5d 100644 (file)
@@ -1,5 +1,5 @@
 /* OpenMP directive translation -- generate GCC trees from gfc_code.
-   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>
 
@@ -711,11 +711,11 @@ gfc_trans_omp_array_reduction (tree c, gfc_symbol *sym, locus where)
   gfc_free_expr (e2);
   gfc_free_expr (e3);
   gfc_free_expr (e4);
-  gfc_free (symtree1);
-  gfc_free (symtree2);
-  gfc_free (symtree3);
+  free (symtree1);
+  free (symtree2);
+  free (symtree3);
   if (symtree4)
-    gfc_free (symtree4);
+    free (symtree4);
   gfc_free_array_spec (outer_sym.as);
 }
 
index 2d43627fd1850a4cec5012fb4c23a21352bc0092..7d72b7e4df842573febca2a2043208b8745df113 100644 (file)
@@ -2484,8 +2484,8 @@ cleanup_forall_symtrees (gfc_code *c)
 {
   forall_restore_symtree (c->expr1);
   forall_restore_symtree (c->expr2);
-  gfc_free (new_symtree->n.sym);
-  gfc_free (new_symtree);
+  free (new_symtree->n.sym);
+  free (new_symtree);
 }
 
 
@@ -3705,22 +3705,22 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info)
     gfc_restore_sym (fa->var->symtree->n.sym, &saved_vars[n]);
 
   /* Free the space for var, start, end, step, varexpr.  */
-  gfc_free (var);
-  gfc_free (start);
-  gfc_free (end);
-  gfc_free (step);
-  gfc_free (varexpr);
-  gfc_free (saved_vars);
+  free (var);
+  free (start);
+  free (end);
+  free (step);
+  free (varexpr);
+  free (saved_vars);
 
   for (this_forall = info->this_loop; this_forall;)
     {
       iter_info *next = this_forall->next;
-      gfc_free (this_forall);
+      free (this_forall);
       this_forall = next;
     }
 
   /* Free the space for this forall_info.  */
-  gfc_free (info);
+  free (info);
 
   if (pmask)
     {
index 9786d97a0cde720f5f3208fce52460edb10a3933..1b3a6b0ba720e34009b90ff305a8a991a5410b93 100644 (file)
@@ -407,12 +407,12 @@ trans_runtime_error_vararg (bool error, locus* where, const char* msgid,
 
   arg = gfc_build_addr_expr (pchar_type_node,
                             gfc_build_localized_cstring_const (message));
-  gfc_free(message);
+  free (message);
   
   asprintf (&message, "%s", _(msgid));
   arg2 = gfc_build_addr_expr (pchar_type_node,
                              gfc_build_localized_cstring_const (message));
-  gfc_free(message);
+  free (message);
 
   /* Build the argument array.  */
   argarray = XALLOCAVEC (tree, nargs + 2);
@@ -1149,7 +1149,7 @@ void
 gfc_restore_backend_locus (locus * loc)
 {
   gfc_set_backend_locus (loc);
-  gfc_free (loc->lb);
+  free (loc->lb);
 }