From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1472) id CBE013858010; Fri, 5 Nov 2021 21:09:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBE013858010 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Bernhard Reutner-Fischer To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4960] Fortran: Delete unused decl in gfortran.h X-Act-Checkin: gcc X-Git-Author: Bernhard Reutner-Fischer X-Git-Refname: refs/heads/master X-Git-Oldrev: 452a0afbace650d7c0f2811e2b47e62dcd18e1fd X-Git-Newrev: c64ca0e7bbe193b95f50b0d3daf9ff7b710d6c6b Message-Id: <20211105210931.CBE013858010@sourceware.org> Date: Fri, 5 Nov 2021 21:09:31 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2021 21:09:31 -0000 https://gcc.gnu.org/g:c64ca0e7bbe193b95f50b0d3daf9ff7b710d6c6b commit r12-4960-gc64ca0e7bbe193b95f50b0d3daf9ff7b710d6c6b Author: Bernhard Reutner-Fischer Date: Wed Oct 27 23:01:21 2021 +0200 Fortran: Delete unused decl in gfortran.h gcc/fortran/ChangeLog: * decl.c (gfc_insert_kind_parameter_exprs): Make static. * expr.c (gfc_build_init_expr): Make static (gfc_build_default_init_expr): Move below its static helper. * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common, gfc_add_common, gfc_use_derived_tree, gfc_free_charlen, gfc_get_ultimate_derived_super_type, gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr, gfc_iso_c_sub_interface): Delete. * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make static. Diff: --- gcc/fortran/decl.c | 2 +- gcc/fortran/expr.c | 20 ++++++++++---------- gcc/fortran/gfortran.h | 9 --------- gcc/fortran/symbol.c | 4 ++-- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 2788348d1be..e9e23fe1acb 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3713,7 +3713,7 @@ insert_parameter_exprs (gfc_expr* e, gfc_symbol* sym ATTRIBUTE_UNUSED, } -bool +static bool gfc_insert_kind_parameter_exprs (gfc_expr *e) { return gfc_traverse_expr (e, NULL, &insert_parameter_exprs, 0); diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 4dea840e348..087d822021a 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4587,21 +4587,12 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_component *comp, gfc_expr *rvalue) return true; } -/* Invoke gfc_build_init_expr to create an initializer expression, but do not - * require that an expression be built. */ - -gfc_expr * -gfc_build_default_init_expr (gfc_typespec *ts, locus *where) -{ - return gfc_build_init_expr (ts, where, false); -} - /* Build an initializer for a local integer, real, complex, logical, or character variable, based on the command line flags finit-local-zero, finit-integer=, finit-real=, finit-logical=, and finit-character=. With force, an initializer is ALWAYS generated. */ -gfc_expr * +static gfc_expr * gfc_build_init_expr (gfc_typespec *ts, locus *where, bool force) { gfc_expr *init_expr; @@ -4758,6 +4749,15 @@ gfc_build_init_expr (gfc_typespec *ts, locus *where, bool force) return init_expr; } +/* Invoke gfc_build_init_expr to create an initializer expression, but do not + * require that an expression be built. */ + +gfc_expr * +gfc_build_default_init_expr (gfc_typespec *ts, locus *where) +{ + return gfc_build_init_expr (ts, where, false); +} + /* Apply an initialization expression to a typespec. Can be used for symbols or components. Similar to add_init_expr_to_sym in decl.c; could probably be combined with some effort. */ diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index f7662c59a5d..8c11cf6d18d 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -3116,7 +3116,6 @@ struct gfc_vect_builtin_tuple extern hash_map *gfc_vectorized_builtins; /* Handling Parameterized Derived Types */ -bool gfc_insert_kind_parameter_exprs (gfc_expr *); bool gfc_insert_parameter_exprs (gfc_expr *, gfc_actual_arglist *); match gfc_get_pdt_instance (gfc_actual_arglist *, gfc_symbol **, gfc_actual_arglist **); @@ -3348,11 +3347,9 @@ bool gfc_add_threadprivate (symbol_attribute *, const char *, locus *); bool gfc_add_omp_declare_target (symbol_attribute *, const char *, locus *); bool gfc_add_omp_declare_target_link (symbol_attribute *, const char *, locus *); -bool gfc_add_saved_common (symbol_attribute *, locus *); bool gfc_add_target (symbol_attribute *, locus *); bool gfc_add_dummy (symbol_attribute *, const char *, locus *); bool gfc_add_generic (symbol_attribute *, const char *, locus *); -bool gfc_add_common (symbol_attribute *, locus *); bool gfc_add_in_common (symbol_attribute *, const char *, locus *); bool gfc_add_in_equivalence (symbol_attribute *, const char *, locus *); bool gfc_add_data (symbol_attribute *, const char *, locus *); @@ -3387,7 +3384,6 @@ bool gfc_copy_attr (symbol_attribute *, symbol_attribute *, locus *); int gfc_copy_dummy_sym (gfc_symbol **, gfc_symbol *, int); bool gfc_add_component (gfc_symbol *, const char *, gfc_component **); gfc_symbol *gfc_use_derived (gfc_symbol *); -gfc_symtree *gfc_use_derived_tree (gfc_symtree *); gfc_component *gfc_find_component (gfc_symbol *, const char *, bool, bool, gfc_ref **); @@ -3428,7 +3424,6 @@ void gfc_undo_symbols (void); void gfc_commit_symbols (void); void gfc_commit_symbol (gfc_symbol *); gfc_charlen *gfc_new_charlen (gfc_namespace *, gfc_charlen *); -void gfc_free_charlen (gfc_charlen *, gfc_charlen *); void gfc_free_namespace (gfc_namespace *); void gfc_symbol_init_2 (void); @@ -3448,7 +3443,6 @@ void gfc_traverse_gsymbol (gfc_gsymbol *, void (*)(gfc_gsymbol *, void *), void gfc_typebound_proc* gfc_get_typebound_proc (gfc_typebound_proc*); gfc_symbol* gfc_get_derived_super_type (gfc_symbol*); -gfc_symbol* gfc_get_ultimate_derived_super_type (gfc_symbol*); bool gfc_type_is_extension_of (gfc_symbol *, gfc_symbol *); bool gfc_type_compatible (gfc_typespec *, gfc_typespec *); @@ -3542,7 +3536,6 @@ void gfc_omp_restore_state (struct gfc_omp_saved_state *); void gfc_free_expr_list (gfc_expr_list *); void gfc_resolve_oacc_directive (gfc_code *, gfc_namespace *); void gfc_resolve_oacc_declare (gfc_namespace *); -void gfc_resolve_oacc_parallel_loop_blocks (gfc_code *, gfc_namespace *); void gfc_resolve_oacc_blocks (gfc_code *, gfc_namespace *); void gfc_resolve_oacc_routines (gfc_namespace *); @@ -3599,7 +3592,6 @@ bool gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, bool gfc_check_assign_symbol (gfc_symbol *, gfc_component *, gfc_expr *); gfc_expr *gfc_build_default_init_expr (gfc_typespec *, locus *); -gfc_expr *gfc_build_init_expr (gfc_typespec *, locus *, bool); void gfc_apply_init (gfc_typespec *, symbol_attribute *, gfc_expr *); bool gfc_has_default_initializer (gfc_symbol *); gfc_expr *gfc_default_initializer (gfc_typespec *); @@ -3665,7 +3657,6 @@ bool gfc_resolve_dim_arg (gfc_expr *); bool gfc_is_formal_arg (void); bool gfc_resolve_substring (gfc_ref *, bool *); void gfc_resolve_substring_charlen (gfc_expr *); -match gfc_iso_c_sub_interface(gfc_code *, gfc_symbol *); gfc_expr *gfc_expr_to_initialize (gfc_expr *); bool gfc_type_is_extensible (gfc_symbol *); bool gfc_resolve_intrinsic (gfc_symbol *, locus *); diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index d6f53f4ff20..8c9a1d00ce0 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -3985,7 +3985,7 @@ gfc_new_charlen (gfc_namespace *ns, gfc_charlen *old_cl) /* Free the charlen list from cl to end (end is not freed). Free the whole list if end is NULL. */ -void +static void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end) { gfc_charlen *cl2; @@ -5108,7 +5108,7 @@ gfc_get_derived_super_type (gfc_symbol* derived) /* Get the ultimate super-type of a given derived type. */ -gfc_symbol* +static gfc_symbol* gfc_get_ultimate_derived_super_type (gfc_symbol* derived) { if (!derived->attr.extension)