From patchwork Sun Oct 24 22:30:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46585 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E17723858403 for ; Sun, 24 Oct 2021 22:40:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E17723858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635115223; bh=UJ5EQCMpk5YcqAz5SMSMyF4WdplwBrMnuT02PFzfQ8E=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ub6GoEnJSb51jquILLOrtVcDjNNhVRslvbhL1Ss7DVSNkZO6gwqgyHXX+nDmqp1u0 ohW/rSINJLGMYe4e7LYSk8I4Nfxg+RZ40aF18OkMN0S98/XBkiTSwlP4Sg1vIEzlf1 a3qhXS25oKetbmzbKnKQsVKgooV6QJoRU/wkCeqU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id BC9233858400; Sun, 24 Oct 2021 22:30:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC9233858400 Received: by mail-wr1-x429.google.com with SMTP id d10so5143053wrb.1; Sun, 24 Oct 2021 15:30:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UJ5EQCMpk5YcqAz5SMSMyF4WdplwBrMnuT02PFzfQ8E=; b=uZTpp34ISy61n+tAUuztQEG/Ji3tc1uB7kvtqfFKFK6BqB/y7To8m/Fr+cyWyUtoNL I+jeKky89tAWlbFEIGcxCsW1XpET8pOgqufZ6dmEMiaRRNWXfNtq9pl1Gvt203sPoq72 l+jwMaSxXzFpnuD4vEjgtvqRHQqPxixLTME53BEonXUR217aI7yVkhT07trYaAuubO/h 1KBIzGt7MFYN4WGM0hR7kptqQvIWggygqndY5YoaMwgI9C8UFXVOfDpv2kIjK2NnQGQL fGt8SqUtbcynndE+nQOdGQLUay8lKMaoZ/g+6xgfu4COft6Hvtk1aNehDVMb82B7Tl/S dwzA== X-Gm-Message-State: AOAM530cCgKGMOAijRr9wgqIIfXS196w665brPSrehHWg0dwfHupG6QW Okglu38sYmKoDKYLxx/t7ftADDG1w4Q= X-Google-Smtp-Source: ABdhPJzHlsAl23WV22C8naK12vCLgJQIFLZ+0MS+hJ1UtSUSUFFYt4LAq+gwGQMaTGapOlcX7nco7A== X-Received: by 2002:adf:b350:: with SMTP id k16mr18351628wrd.368.1635114641815; Sun, 24 Oct 2021 15:30:41 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id f3sm17138033wmb.12.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:40 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005usu-O2; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 1/7] Fortran: make some trans* functions static Date: Mon, 25 Oct 2021 00:30:17 +0200 Message-Id: <20211024223023.1410274-2-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer This makes some trans* functions static and deletes declarations of functions that either do not exist anymore like gfc_get_function_decl or that are unused like gfc_check_any_c_kind. gcc/fortran/ChangeLog: * expr.c (is_non_empty_structure_constructor): Make static. * gfortran.h (gfc_check_any_c_kind): Delete. * match.c (gfc_match_label): Make static. * match.h (gfc_match_label): Delete declaration. * scanner.c (file_changes_cur, file_changes_count, file_changes_allocated): Make static. * trans-expr.c (gfc_get_character_len): Make static. (gfc_class_len_or_zero_get): Make static. (VTAB_GET_FIELD_GEN): Undefine. (gfc_get_class_array_ref): Make static. (gfc_finish_interface_mapping): Make static. * trans-types.c (gfc_check_any_c_kind): Delete. (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static. * trans-types.h (gfc_get_ppc_type): Delete declaration. * trans.c (gfc_msg_wrong_return): Delete. * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get, gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len, gfc_finish_interface_mapping, gfc_msg_wrong_return, gfc_get_function_decl): Delete declaration. --- gcc/fortran/expr.c | 2 +- gcc/fortran/gfortran.h | 1 - gcc/fortran/match.c | 2 +- gcc/fortran/match.h | 1 - gcc/fortran/scanner.c | 4 ++-- gcc/fortran/trans-expr.c | 10 +++++----- gcc/fortran/trans-types.c | 25 +++---------------------- gcc/fortran/trans-types.h | 1 - gcc/fortran/trans.c | 1 - gcc/fortran/trans.h | 11 ----------- 10 files changed, 12 insertions(+), 46 deletions(-) diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index b19d3a26c60..4dea840e348 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4817,7 +4817,7 @@ gfc_apply_init (gfc_typespec *ts, symbol_attribute *attr, gfc_expr *init) /* Check whether an expression is a structure constructor and whether it has other values than NULL. */ -bool +static bool is_non_empty_structure_constructor (gfc_expr * e) { if (e->expr_type != EXPR_STRUCTURE) diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 66192c07d8c..f7662c59a5d 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -3284,7 +3284,6 @@ bool gfc_check_character_range (gfc_char_t, int); extern bool gfc_seen_div0; /* trans-types.c */ -bool gfc_check_any_c_kind (gfc_typespec *); int gfc_validate_kind (bt, int, bool); int gfc_get_int_kind_from_width_isofortranenv (int size); int gfc_get_real_kind_from_width_isofortranenv (int size); diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 53a575e616e..91cde55d7a1 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -599,7 +599,7 @@ cleanup: it. We also make sure the symbol does not refer to another (active) block. A matched label is pointed to by gfc_new_block. */ -match +static match gfc_match_label (void) { char name[GFC_MAX_SYMBOL_LEN + 1]; diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index 21e94f79d95..eb9459ea99c 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -47,7 +47,6 @@ match gfc_match_space (void); match gfc_match_eos (void); match gfc_match_small_literal_int (int *, int *); match gfc_match_st_label (gfc_st_label **); -match gfc_match_label (void); match gfc_match_small_int (int *); match gfc_match_small_int_expr (int *, gfc_expr **); match gfc_match_name (char *); diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 5a450692ba3..69b81ab97f8 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -78,8 +78,8 @@ static struct gfc_file_change gfc_linebuf *lb; int line; } *file_changes; -size_t file_changes_cur, file_changes_count; -size_t file_changes_allocated; +static size_t file_changes_cur, file_changes_count; +static size_t file_changes_allocated; static gfc_char_t *last_error_char; diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 2d7f9e0fb91..e7aec3845d3 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see /* Calculate the number of characters in a string. */ -tree +static tree gfc_get_character_len (tree type) { tree len; @@ -278,7 +278,7 @@ gfc_class_len_get (tree decl) /* Try to get the _len component of a class. When the class is not unlimited poly, i.e. no _len field exists, then return a zero node. */ -tree +static tree gfc_class_len_or_zero_get (tree decl) { tree len; @@ -382,7 +382,7 @@ VTAB_GET_FIELD_GEN (def_init, VTABLE_DEF_INIT_FIELD) VTAB_GET_FIELD_GEN (copy, VTABLE_COPY_FIELD) VTAB_GET_FIELD_GEN (final, VTABLE_FINAL_FIELD) VTAB_GET_FIELD_GEN (deallocate, VTABLE_DEALLOCATE_FIELD) - +#undef VTAB_GET_FIELD_GEN /* The size field is returned as an array index type. Therefore treat it and only it specially. */ @@ -1367,7 +1367,7 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts, /* Given a class array declaration and an index, returns the address of the referenced element. */ -tree +static tree gfc_get_class_array_ref (tree index, tree class_decl, tree data_comp, bool unlimited) { @@ -4531,7 +4531,7 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping, the length of each argument, adding any initialization code to PRE and any finalization code to POST. */ -void +static void gfc_finish_interface_mapping (gfc_interface_mapping * mapping, stmtblock_t * pre, stmtblock_t * post) { diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 42778067dbe..947ab5a099b 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -61,7 +61,7 @@ tree pvoid_type_node; tree prvoid_type_node; tree ppvoid_type_node; tree pchar_type_node; -tree pfunc_type_node; +static tree pfunc_type_node; tree logical_type_node; tree logical_true_node; @@ -133,7 +133,7 @@ int gfc_size_kind; int gfc_numeric_storage_size; int gfc_character_storage_size; -tree dtype_type_node = NULL_TREE; +static tree dtype_type_node = NULL_TREE; /* Build the dtype_type_node if necessary. */ @@ -175,25 +175,6 @@ tree get_dtype_type_node (void) return dtype_type_node; } -bool -gfc_check_any_c_kind (gfc_typespec *ts) -{ - int i; - - for (i = 0; i < ISOCBINDING_NUMBER; i++) - { - /* Check for any C interoperable kind for the given type/kind in ts. - This can be used after verify_c_interop to make sure that the - Fortran kind being used exists in at least some form for C. */ - if (c_interop_kinds_table[i].f90_type == ts->type && - c_interop_kinds_table[i].value == ts->kind) - return true; - } - - return false; -} - - static int get_real_kind_from_node (tree type) { @@ -2470,7 +2451,7 @@ gfc_copy_dt_decls_ifequal (gfc_symbol *from, gfc_symbol *to, /* Build a tree node for a procedure pointer component. */ -tree +static tree gfc_get_ppc_type (gfc_component* c) { tree t; diff --git a/gcc/fortran/trans-types.h b/gcc/fortran/trans-types.h index 15d206b9443..1b43503092b 100644 --- a/gcc/fortran/trans-types.h +++ b/gcc/fortran/trans-types.h @@ -117,7 +117,6 @@ int gfc_is_nodesc_array (gfc_symbol *); tree gfc_get_dtype_rank_type (int, tree); tree gfc_get_dtype (tree, int *rank = NULL); -tree gfc_get_ppc_type (gfc_component *); tree gfc_get_caf_vector_type (int dim); tree gfc_get_caf_reference_type (); diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 22f267645e8..a377d0eeb24 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -45,7 +45,6 @@ along with GCC; see the file COPYING3. If not see static gfc_file *gfc_current_backend_file; const char gfc_msg_fault[] = N_("Array reference out of bounds"); -const char gfc_msg_wrong_return[] = N_("Incorrect function return value"); /* Return a location_t suitable for 'tree' for a gfortran locus. The way the diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 7ec4ca53a2c..0d4eed20d20 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -425,7 +425,6 @@ tree gfc_class_set_static_fields (tree, tree, tree); tree gfc_class_data_get (tree); tree gfc_class_vptr_get (tree); tree gfc_class_len_get (tree); -tree gfc_class_len_or_zero_get (tree); tree gfc_resize_class_size_with_len (stmtblock_t *, tree, tree); gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *, bool is_mold = false, gfc_typespec **ts = NULL); @@ -433,14 +432,12 @@ gfc_expr * gfc_find_and_cut_at_last_class_ref (gfc_expr *, bool is_mold = false, available. */ tree gfc_class_vtab_hash_get (tree); tree gfc_class_vtab_size_get (tree); -tree gfc_class_vtab_extends_get (tree); tree gfc_class_vtab_def_init_get (tree); tree gfc_class_vtab_copy_get (tree); tree gfc_class_vtab_final_get (tree); /* Get an accessor to the vtab's * field, when a vptr handle is present. */ tree gfc_vptr_hash_get (tree); tree gfc_vptr_size_get (tree); -tree gfc_vptr_extends_get (tree); tree gfc_vptr_def_init_get (tree); tree gfc_vptr_copy_get (tree); tree gfc_vptr_final_get (tree); @@ -450,7 +447,6 @@ void gfc_reset_len (stmtblock_t *, gfc_expr *); tree gfc_get_class_from_gfc_expr (gfc_expr *); tree gfc_get_class_from_expr (tree); tree gfc_get_vptr_from_expr (tree); -tree gfc_get_class_array_ref (tree, tree, tree, bool); tree gfc_copy_class_to_class (tree, tree, tree, bool); bool gfc_add_finalizer_call (stmtblock_t *, gfc_expr *); bool gfc_add_comp_finalizer_call (stmtblock_t *, tree, gfc_component *, bool); @@ -509,7 +505,6 @@ void gfc_conv_expr_type (gfc_se * se, gfc_expr *, tree); /* trans-expr.c */ -tree gfc_get_character_len (tree); tree gfc_get_character_len_in_bytes (tree); tree gfc_conv_scalar_to_descriptor (gfc_se *, tree, symbol_attribute); tree gfc_get_ultimate_alloc_ptr_comps_caf_token (gfc_se *, gfc_expr *); @@ -621,9 +616,6 @@ tree gfc_get_extern_function_decl (gfc_symbol *, gfc_actual_arglist *args = NULL, const char *fnspec = NULL); -/* Return the decl for a function. */ -tree gfc_get_function_decl (gfc_symbol *); - /* Build an ADDR_EXPR. */ tree gfc_build_addr_expr (tree, tree); @@ -1171,15 +1163,12 @@ void gfc_init_interface_mapping (gfc_interface_mapping *); void gfc_free_interface_mapping (gfc_interface_mapping *); void gfc_add_interface_mapping (gfc_interface_mapping *, gfc_symbol *, gfc_se *, gfc_expr *); -void gfc_finish_interface_mapping (gfc_interface_mapping *, - stmtblock_t *, stmtblock_t *); void gfc_apply_interface_mapping (gfc_interface_mapping *, gfc_se *, gfc_expr *); /* Standard error messages used in all the trans-*.c files. */ extern const char gfc_msg_fault[]; -extern const char gfc_msg_wrong_return[]; #define OMPWS_WORKSHARE_FLAG 1 /* Set if in a workshare construct. */ #define OMPWS_CURR_SINGLEUNIT 2 /* Set if current gfc_code in workshare From patchwork Sun Oct 24 22:30:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46584 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2611A3858C27 for ; Sun, 24 Oct 2021 22:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2611A3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635115133; bh=jTbgzbc1jruB++bCvOX3zdlaTtk9aZvKB5Hy2LyCcaY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Oj421E0GouV/XKz96eNwpv5hy5/735esxYpgFpdp0U1xgpJt0VGali8L5TyRfyqci WhU7ef6zMkaE6psA7iIPkZlNwfNkQcjR9a9rW+batCEGPKHAygANNxwpvcK1LcwSNj /7Pq5zc9goKcitbOiVILU8bce/ozeFH4QGAlMQ88= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 9AD423858404; Sun, 24 Oct 2021 22:30:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AD423858404 Received: by mail-wr1-x42f.google.com with SMTP id v17so7935028wrv.9; Sun, 24 Oct 2021 15:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jTbgzbc1jruB++bCvOX3zdlaTtk9aZvKB5Hy2LyCcaY=; b=BkuRp8G7ueQO9aI/l5/CRDCALKiEL0VjXkR+oz0OX4gOyXRTvTszjikm4NEqVeNQJe eklViDWro5vuKYD+gcEJWwQn1wcZMosgKlL2/8Jh91fCKuKLS2BIy1plLRBdhqK4OqHV H0bLF7EHBKT16OODpQdOoFT7jsQEefqHw/uh18R4YbAOl6zZbFenrHrWXXpwGH8X/GoT 5T9kJGyloufsMyqZuVI6Jql2bzRFhbFbPkRLzcp0+p2BDhXSA/lmezb2NkEjbiWLPsKW FnsSh8Fq2nDmdYwtlL+bETx3HKUuVUtjIu0cz7x4Xb7G2pYG9AAkMlA50H4FJSp9cpIi gO/A== X-Gm-Message-State: AOAM533Skd4fq4WhEJg3EA3jzdPs7j+RXDKc8loEhioiSEazwMPswRNV VrDEiIy43DRB3jB/6E9NtmGeJ9CzRM4= X-Google-Smtp-Source: ABdhPJxjZMUBWOZPsPFYgD9Ld8x6x8xEEIpU+98cLlUxREvotGK1bbxAebU8JqeOK08Nj2ExYOoCJA== X-Received: by 2002:adf:f48d:: with SMTP id l13mr18903886wro.94.1635114640686; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id e18sm5880469wrv.44.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005usx-ON; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 2/7] Fortran: make some match* functions static Date: Mon, 25 Oct 2021 00:30:18 +0200 Message-Id: <20211024223023.1410274-3-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gfc_match_small_int_expr was unused, delete it. gfc_match_gcc_unroll should use gfc_match_small_literal_int and then gfc_match_small_int can be deleted since it will be unused. gcc/fortran/ChangeLog: * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c, set_verify_bind_c_sym, set_verify_bind_c_com_block, get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec, (check_extended_derived_type): Make static. (gfc_match_gcc_unroll): Add comment. * match.c (gfc_match_small_int_expr): Delete definition. * match.h (gfc_match_small_int_expr): Delete declaration. (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c, set_verify_bind_c_sym, set_verify_bind_c_com_block, get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec): Delete declaration. --- gcc/fortran/decl.c | 15 ++++++++------- gcc/fortran/match.c | 26 -------------------------- gcc/fortran/match.h | 9 --------- 3 files changed, 8 insertions(+), 42 deletions(-) diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 6043e100fbb..1e034d1b344 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3128,7 +3128,7 @@ cleanup: This assumes that the byte size is equal to the kind number for non-COMPLEX types, and equal to twice the kind number for COMPLEX. */ -match +static match gfc_match_old_kind_spec (gfc_typespec *ts) { match m; @@ -5867,7 +5867,7 @@ set_binding_label (const char **dest_label, const char *sym_name, /* Set the status of the given common block as being BIND(C) or not, depending on the given parameter, is_bind_c. */ -void +static void set_com_block_bind_c (gfc_common_head *com_block, int is_bind_c) { com_block->is_bind_c = is_bind_c; @@ -6055,7 +6055,7 @@ verify_bind_c_sym (gfc_symbol *tmp_sym, gfc_typespec *ts, the type is C interoperable. Errors are reported by the functions used to set/test these fields. */ -bool +static bool set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents) { bool retval = true; @@ -6075,7 +6075,7 @@ set_verify_bind_c_sym (gfc_symbol *tmp_sym, int num_idents) /* Set the fields marking the given common block as BIND(C), including a binding label, and report any errors encountered. */ -bool +static bool set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents) { bool retval = true; @@ -6095,7 +6095,7 @@ set_verify_bind_c_com_block (gfc_common_head *com_block, int num_idents) /* Retrieve the list of one or more identifiers that the given bind(c) attribute applies to. */ -bool +static bool get_bind_c_idents (void) { char name[GFC_MAX_SYMBOL_LEN + 1]; @@ -6804,7 +6804,7 @@ match_result (gfc_symbol *function, gfc_symbol **result) clause and BIND(C), either one, or neither. The draft does not require them to come in a specific order. */ -match +static match gfc_match_suffix (gfc_symbol *sym, gfc_symbol **result) { match is_bind_c; /* Found bind(c). */ @@ -10116,7 +10116,7 @@ check_extended_derived_type (char *name) not a handled attribute, and MATCH_YES otherwise. TODO: More error checking on attribute conflicts needs to be done. */ -match +static match gfc_get_type_attr_spec (symbol_attribute *attr, char *name) { /* See if the derived type is marked as private. */ @@ -11794,6 +11794,7 @@ gfc_match_gcc_unroll (void) { int value; + /* FIXME: use gfc_match_small_literal_int instead, delete small_int */ if (gfc_match_small_int (&value) == MATCH_YES) { if (value < 0 || value > USHRT_MAX) diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 91cde55d7a1..5d07f897e45 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -530,32 +530,6 @@ gfc_match_small_int (int *value) } -/* This function is the same as the gfc_match_small_int, except that - we're keeping the pointer to the expr. This function could just be - removed and the previously mentioned one modified, though all calls - to it would have to be modified then (and there were a number of - them). Return MATCH_ERROR if fail to extract the int; otherwise, - return the result of gfc_match_expr(). The expr (if any) that was - matched is returned in the parameter expr. */ - -match -gfc_match_small_int_expr (int *value, gfc_expr **expr) -{ - match m; - int i; - - m = gfc_match_expr (expr); - if (m != MATCH_YES) - return m; - - if (gfc_extract_int (*expr, &i, 1)) - m = MATCH_ERROR; - - *value = i; - return m; -} - - /* Matches a statement label. Uses gfc_match_small_literal_int() to do most of the work. */ diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index eb9459ea99c..e9368db281d 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -48,9 +48,7 @@ match gfc_match_eos (void); match gfc_match_small_literal_int (int *, int *); match gfc_match_st_label (gfc_st_label **); match gfc_match_small_int (int *); -match gfc_match_small_int_expr (int *, gfc_expr **); match gfc_match_name (char *); -match gfc_match_name_C (const char **buffer); match gfc_match_symbol (gfc_symbol **, int); match gfc_match_sym_tree (gfc_symtree **, int); match gfc_match_intrinsic_op (gfc_intrinsic_op *); @@ -236,7 +234,6 @@ match gfc_match_omp_end_single (void); match gfc_match_data (void); match gfc_match_null (gfc_expr **); match gfc_match_kind_spec (gfc_typespec *, bool); -match gfc_match_old_kind_spec (gfc_typespec *); match gfc_match_decl_type_spec (gfc_typespec *, int); match gfc_match_end (gfc_statement *); @@ -295,14 +292,8 @@ match gfc_match_volatile (void); /* Fortran 2003 c interop. TODO: some of these should be moved to another file rather than decl.c */ -void set_com_block_bind_c (gfc_common_head *, int); -bool set_verify_bind_c_sym (gfc_symbol *, int); -bool set_verify_bind_c_com_block (gfc_common_head *, int); -bool get_bind_c_idents (void); match gfc_match_bind_c_stmt (void); -match gfc_match_suffix (gfc_symbol *, gfc_symbol **); match gfc_match_bind_c (gfc_symbol *, bool); -match gfc_get_type_attr_spec (symbol_attribute *, char*); /* primary.c. */ match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **); From patchwork Sun Oct 24 22:30:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46579 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95C003858414 for ; Sun, 24 Oct 2021 22:32:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95C003858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635114763; bh=6TuroxushS98TXJ6YhIwMmolW1GcFrHzU4gRoBUhS1k=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wJctmp4cqC40dB+y9WYWtvxroHDrcCSAe9lXDyW2RigGP+2vsbRI4z+E0lMnQOPqc yfE990ftjIt8JJ0qXiz3ZiDVWs9o3kUdj44mCAIE/CewHfkTmECHBqs60b8xVP8l71 c6ub0GF1Q0ySOn7NK0zJEJOf0Smi7ayinbqy4EjE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 51FBE3858C2C; Sun, 24 Oct 2021 22:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51FBE3858C2C Received: by mail-wm1-x336.google.com with SMTP id p21so8808849wmq.1; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6TuroxushS98TXJ6YhIwMmolW1GcFrHzU4gRoBUhS1k=; b=IHIBRFYj+RD6ctmEsawtXcXmutndGXWu5pw3mfYzzXqwbdxq8EvJcsoPkScp2Wm9Sg YxoOXezQzxybzIM3pKkhOEuky+od8p+kJsIguVJtNKhqzrD0f/o1Wn8dEOzlIexoM7/P KwgsMKW9xrDI9q9wrZd8CH86kpjZwadEU4NO1JFFlqEI4kTofId1EiwIf+1MeYOYtZ06 iOTS3rufcdHruFdY6fRl4PtEv7Dp7JxDhh7+iLPeVoG83ivhor6FVqTr3qX77zokv8EM o/4Dm5JEme/CTdxMHQQPEB6fGnG1n21mE33xqy9Bk4aZ4DiSkuJdY7bpjnJ86nwUA2n8 0nKw== X-Gm-Message-State: AOAM533yd3i/kHLf6nSOM5XHk+oLh+Zuzji6b3Nvcgwe24cMuVoqWeEi RHMbFZoqMT4CylGdc1tma8s= X-Google-Smtp-Source: ABdhPJzfFjWD8rZIHeJBHy7fJ5lWf3ffGOKiIc7rsZIHdnSwLBakrKuvT69335uhMzB6XgkeuJLHmA== X-Received: by 2002:a7b:cb92:: with SMTP id m18mr31786490wmi.15.1635114639326; Sun, 24 Oct 2021 15:30:39 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id 13sm228215wrz.38.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005ut0-Oh; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 3/7] Fortran: make some constructor* functions static Date: Mon, 25 Oct 2021 00:30:19 +0200 Message-Id: <20211024223023.1410274-4-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gfc_constructor_expr_foreach and gfc_constructor_swap were just stubs. gcc/fortran/ChangeLog: * constructor.c (gfc_constructor_get_base): Make static. (gfc_constructor_expr_foreach, (gfc_constructor_swap): Delete. * constructor.h (gfc_constructor_get_base): Remove declaration. (gfc_constructor_expr_foreach, (gfc_constructor_swap): Delete. --- gcc/fortran/constructor.c | 20 ++------------------ gcc/fortran/constructor.h | 10 ---------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/gcc/fortran/constructor.c b/gcc/fortran/constructor.c index 3e4377a5ad3..4b5a748271b 100644 --- a/gcc/fortran/constructor.c +++ b/gcc/fortran/constructor.c @@ -85,7 +85,8 @@ gfc_constructor_get (void) return c; } -gfc_constructor_base gfc_constructor_get_base (void) +static gfc_constructor_base +gfc_constructor_get_base (void) { return splay_tree_new (splay_tree_compare_ints, NULL, node_free); } @@ -209,23 +210,6 @@ gfc_constructor_lookup_expr (gfc_constructor_base base, int offset) } -int -gfc_constructor_expr_foreach (gfc_constructor *ctor ATTRIBUTE_UNUSED, - int(*f)(gfc_expr *) ATTRIBUTE_UNUSED) -{ - gcc_assert (0); - return 0; -} - -void -gfc_constructor_swap (gfc_constructor *ctor ATTRIBUTE_UNUSED, - int n ATTRIBUTE_UNUSED, int m ATTRIBUTE_UNUSED) -{ - gcc_assert (0); -} - - - gfc_constructor * gfc_constructor_first (gfc_constructor_base base) { diff --git a/gcc/fortran/constructor.h b/gcc/fortran/constructor.h index 85a72dcfc0e..25cd6a8f192 100644 --- a/gcc/fortran/constructor.h +++ b/gcc/fortran/constructor.h @@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see /* Get a new constructor structure. */ gfc_constructor *gfc_constructor_get (void); -gfc_constructor_base gfc_constructor_get_base (void); - /* Copy a constructor structure. */ gfc_constructor_base gfc_constructor_copy (gfc_constructor_base base); @@ -64,14 +62,6 @@ gfc_constructor *gfc_constructor_lookup (gfc_constructor_base base, int n); */ gfc_expr *gfc_constructor_lookup_expr (gfc_constructor_base base, int n); - -int gfc_constructor_expr_foreach (gfc_constructor *ctor, int(*)(gfc_expr *)); - - -void gfc_constructor_swap (gfc_constructor *ctor, int n, int m); - - - /* Get the first constructor node in the constructure structure. Returns NULL if there is no such expression. */ gfc_constructor *gfc_constructor_first (gfc_constructor_base base); From patchwork Sun Oct 24 22:30:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46582 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA6FE3858404 for ; Sun, 24 Oct 2021 22:36:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA6FE3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635114985; bh=Bo5aE/EF5/EgUpiAuE/0g6y6jM1FRCwk+P0er5c2ZV4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=e9jsTezJ5sbc+lxOi0ggX5yKPFx3S20E23pcjcM+tLJ3l0FouiZPgJlGSqHL4NLkA 9FEdVZTfvRiifUFCWJYgvU0+yeUCpsg1zm8I4b+twmvPNaaxiHS/q7jH9r2qZiHe+z brzZp2ShjiEkBnBTSNnB00JUUy+83uaJFhmmYgu8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 0721E3858400; Sun, 24 Oct 2021 22:30:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0721E3858400 Received: by mail-wr1-x430.google.com with SMTP id d10so5142936wrb.1; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bo5aE/EF5/EgUpiAuE/0g6y6jM1FRCwk+P0er5c2ZV4=; b=5X+ihX3zYw53oOUYvau5JRLiSMxmHhA64Tal+R29EB23dtI0JohxAc2SA4ckwlonBU d5VlT9vhrXJu9/B/cmUGbfO+FYkA6bzm8+VQ4ywFCzCTxyQY7TFqbVtCWRIOR8xoZ5Du 4WHXJBrS9XvWPGVXI+wJ0fJ/55W1UHX51A0PhUUszNlIrjyThlIOUt9b/j67utW8EZ07 cvYwF5DuB0yAFdjuyZfa7aLb1wjCaQfFF1Nl4QfVlNQLbO1hn9caMBZJqCvxpi6waoTo 94P5+PGiBEqT3yew2wynjpmv1GOGA6hazRANWX8Z9JBH1xmtxsQhWnj4c3977lmmQuCW xDeA== X-Gm-Message-State: AOAM531exJkJsxO03bVYm/cI83F7AkLjWSqeh6ACXbtoATRrzdikALRS jAl428j5tOwCWo9V0zuK11I= X-Google-Smtp-Source: ABdhPJy5eR/vdLlYyQA7zMt/XCr5GFdzmpLBMvbCf1kFzhElIPVv/2eWBu6jy+4iE02EAlVJLxq5BQ== X-Received: by 2002:adf:dd07:: with SMTP id a7mr12498977wrm.395.1635114640089; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id o6sm20205618wri.49.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005ut3-P2; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 4/7] Fortran: make some trans-array functions static Date: Mon, 25 Oct 2021 00:30:20 +0200 Message-Id: <20211024223023.1410274-5-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-array.c (gfc_trans_scalarized_loop_end): Make static. * trans-array.h (gfc_trans_scalarized_loop_end, gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration. --- gcc/fortran/trans-array.c | 2 +- gcc/fortran/trans-array.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index bceb8b24ba4..5ceb261b698 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4161,7 +4161,7 @@ gfc_start_scalarized_body (gfc_loopinfo * loop, stmtblock_t * pbody) /* Generates the actual loop code for a scalarization loop. */ -void +static void gfc_trans_scalarized_loop_end (gfc_loopinfo * loop, int n, stmtblock_t * pbody) { diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index 1d3dc4819eb..12068c742a5 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -118,8 +118,6 @@ void gfc_copy_loopinfo_to_se (gfc_se *, gfc_loopinfo *); /* Marks the start of a scalarized expression, and declares loop variables. */ void gfc_start_scalarized_body (gfc_loopinfo *, stmtblock_t *); -/* Generates one actual loop for a scalarized expression. */ -void gfc_trans_scalarized_loop_end (gfc_loopinfo *, int, stmtblock_t *); /* Generates the actual loops for a scalarized expression. */ void gfc_trans_scalarizing_loops (gfc_loopinfo *, stmtblock_t *); /* Mark the end of the main loop body and the start of the copying loop. */ @@ -137,8 +135,6 @@ tree gfc_build_null_descriptor (tree); void gfc_conv_array_ref (gfc_se *, gfc_array_ref *, gfc_expr *, locus *); /* Translate a reference to a temporary array. */ void gfc_conv_tmp_array_ref (gfc_se * se); -/* Translate a reference to an array temporary. */ -void gfc_conv_tmp_ref (gfc_se *); /* Calculate the overall offset, including subreferences. */ void gfc_get_dataptr_offset (stmtblock_t*, tree, tree, tree, bool, gfc_expr*); @@ -149,8 +145,6 @@ void gfc_conv_expr_descriptor (gfc_se *, gfc_expr *); /* Convert an array for passing as an actual function parameter. */ void gfc_conv_array_parameter (gfc_se *, gfc_expr *, bool, const gfc_symbol *, const char *, tree *); -/* Evaluate and transpose a matrix expression. */ -void gfc_conv_array_transpose (gfc_se *, gfc_expr *); /* These work with both descriptors and descriptorless arrays. */ tree gfc_conv_array_data (tree); From patchwork Sun Oct 24 22:30:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46583 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1F3C385841B for ; Sun, 24 Oct 2021 22:37:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1F3C385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635115059; bh=MlLsqLbSpGZUPCuRq0I1RByd3I36Cpq7+UbdfzDjS5Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vcQcmUaLODf++++UjO0sRWIDdCdpQUpLiVAsnNoxx/tlPV33M8nRBRAMeABH+bbNR umAvZlAqq+L3dbxbngXNHqsxQ3RQZpMAM0IfRAB1Tjj32EP95GVTRipKrWZsFE4Ccg Vcd27Gndr3hyNkFwHZNtL911pHcYjgnTzdh8VUr4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id F14CA3858D3C; Sun, 24 Oct 2021 22:30:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F14CA3858D3C Received: by mail-wr1-x431.google.com with SMTP id e12so9215146wra.4; Sun, 24 Oct 2021 15:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MlLsqLbSpGZUPCuRq0I1RByd3I36Cpq7+UbdfzDjS5Q=; b=dUzTHVePZ0VLDlIPgCEF02zN9iv2ufLSOer0oRCthC9lYwQmC7O9KTVVzPHYnc1/oQ 4hJl79b5g3rcnHjp9IpcmXTjFiJtPXTHkpDuZYKUkJvTCmgIQ3M2ZETXlWoVriG7ULmH V32zyH8jt/XCFg2H3rsvsRCQ59lngy+4bXGTMuGwCUdISGwz6nZAO+Ongq4olyHr9AHp 45EfWTsGq0hm6pc/aoA/9bF5OaFaOAhj0LD46WW6xIMkDymmxH4lqLfiXOd7VZ7ntrho PqQtwV/CdJRza1l52IbnWShnuTYB6jpfm6SRgvw9VqmhQlkm5D+qbovJ0W5yWqeC5lNS zmWQ== X-Gm-Message-State: AOAM530Gn+xOnZPPiSEK2HqGGPjuyvfpzM+gTLfe7Uc5iYQBYLn/PJ1y Wmyon3OsytpfxTZJRAuGhOY= X-Google-Smtp-Source: ABdhPJyZswQHVqN6/YXJJtfPUVXTncii+1CpYr+5Dx6mtn7Yp/br/HmJl+Puh2znWo/QQp+WSuweSg== X-Received: by 2002:a05:6000:44:: with SMTP id k4mr18555945wrx.68.1635114641096; Sun, 24 Oct 2021 15:30:41 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id g3sm16667618wri.45.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:40 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005utA-PO; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 5/7] Fortran: Delete unused decl in trans-stmt.h Date: Mon, 25 Oct 2021 00:30:21 +0200 Message-Id: <20211024223023.1410274-6-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-stmt.h (gfc_trans_deallocate_array): Delete. --- gcc/fortran/trans-stmt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/fortran/trans-stmt.h b/gcc/fortran/trans-stmt.h index 1a24d9b4cdc..e824caf4d08 100644 --- a/gcc/fortran/trans-stmt.h +++ b/gcc/fortran/trans-stmt.h @@ -66,7 +66,6 @@ tree gfc_trans_sync_team (gfc_code *); tree gfc_trans_where (gfc_code *); tree gfc_trans_allocate (gfc_code *); tree gfc_trans_deallocate (gfc_code *); -tree gfc_trans_deallocate_array (tree); /* trans-openmp.c */ tree gfc_trans_omp_directive (gfc_code *); From patchwork Sun Oct 24 22:30:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46581 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C6E9A3858C27 for ; Sun, 24 Oct 2021 22:35:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6E9A3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635114911; bh=wprXhqRA4pxRvkGvpfPp0izjfVnz142SaqiW40MXNog=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xxkkZBrOgK8C4BwNmwnp4wqlyxR9RnedTZO7vunryc/o3vwHwN5EX9DRTPOEXoKAK vnlrrdLXtccU/XIM6CbV91LwcjQCnSVQ51XvjFyuvJYovD+XP3jbMKV2TSdFL6kuZ/ 53wHhwJsnxC6P1zeck13Yc0CQBKdmmDb+4pkEp8A= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 2A35C3858403; Sun, 24 Oct 2021 22:30:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A35C3858403 Received: by mail-wr1-x432.google.com with SMTP id e4so9245019wrc.7; Sun, 24 Oct 2021 15:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wprXhqRA4pxRvkGvpfPp0izjfVnz142SaqiW40MXNog=; b=Ah0mROLdQ5eS/4TbaLz5mganM8bi4J7o+CSuZhm7Nuu3EY6xeBev03Q+Bi4nZPVfQp PCu8WysrPMI+NGBUJ1iTmTFQ73zeack0wNv0UxZBM1PXeAwd+MPJZVe6i+wjJqW5BKoj ralyXoMvrR+cGH1zFzALPGTeXnWMavVlcJ/LbsPOASRzwTBKX6nR2zjI/MZTxNQ1N3mQ YrQVtJIID1+PI3hhOxlfTSfWpF1Nh+ATTyD9kcfd2miYlEu8xduwy6t9Y2bcCNrm4DW+ ZIYcEX/C7BB2zvnKlBrk94NTu+z8+1U+6LJvlsK4mtU0SaegpArF8eCfYbNwdf0rQDbd Jr/g== X-Gm-Message-State: AOAM533F2C/M7RmbIruGKIT6596mQBvPEMtkXXJWSBDxTiPYJKkAc1Va Okqd4/pfHclUbQ4EAI0guJAo24NU1IE= X-Google-Smtp-Source: ABdhPJyCZBQYYhpGTJ6I0LwqKaQDczN4uCDk8vdkQNqjUoa05dZ19lTQFxP3Fu0+2hTj5FPc2mCE2w== X-Received: by 2002:a5d:6dae:: with SMTP id u14mr18436395wrs.46.1635114640305; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id d8sm15364429wrv.80.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005utE-Pk; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 6/7] Fortran: Delete unused decl in trans-types.h Date: Mon, 25 Oct 2021 00:30:22 +0200 Message-Id: <20211024223023.1410274-7-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * trans-types.h (gfc_convert_function_code): Delete. --- gcc/fortran/trans-types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/fortran/trans-types.h b/gcc/fortran/trans-types.h index 1b43503092b..3bc236cad0d 100644 --- a/gcc/fortran/trans-types.h +++ b/gcc/fortran/trans-types.h @@ -65,9 +65,6 @@ enum gfc_packed { PACKED_STATIC }; -/* be-function.c */ -void gfc_convert_function_code (gfc_namespace *); - /* trans-types.c */ void gfc_init_kinds (void); void gfc_init_types (void); From patchwork Sun Oct 24 22:30:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 46580 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 946EC385840D for ; Sun, 24 Oct 2021 22:33:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 946EC385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635114838; bh=XJAna1e4GyN8HfSPOVtTlU0EZAj6ne8ABvWJD/XhNnw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=WGoUYxfUiD9jS2LiU9SiA3Bqod5pctRAI6CPEZ300ebHtJS312EmKSUU7Kky9wILo w7ekJAvWTpPB50Gp0iKCD4qgrMnx/oV83mziW5hmBCcFuHz/BeakTDlZbjjrebSGu2 WiW0s8Tnp3tl6tatZvWvWtfyTXX987ebN5QV/hpo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 1987D3858D3C; Sun, 24 Oct 2021 22:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1987D3858D3C Received: by mail-wr1-x433.google.com with SMTP id d13so6734139wrf.11; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XJAna1e4GyN8HfSPOVtTlU0EZAj6ne8ABvWJD/XhNnw=; b=Krbf3KPBqDHAMna+Wr7gEAOkmTM8YK+3FRa/eIICVntDrrYFLRjZwIpGc26BlJsGyN 4hR8SZM4O/wsGBTCrDlIOpQ2rtEAyCbrZGgtToOv5qCLlw0ut9+TvoqqqVhT6jAE60dZ XnJRELMJUarw6QLUCozNxPHvtt3X/fdeemv1sg5Dkz6wvcHXS4QqSRcS/QJ/NgHz8LAU lM8Cdzji3LfYYxR6fvkL10AKTF8umUuWicH7Ey6RcjhDHTr3Vo0wqSOvSLmvFoyg+DoD t3EEeC3J5cw2eKt35nSAPmahs+HCZj0Kgxna3A39J4WlbfesGCDvEkv/nsyxAcbjL6IL GS5Q== X-Gm-Message-State: AOAM530BxHjN2PfWQUNUJd4b7a1YTTGKex0GpHHXo1IvISgpCcO4VBaT Epx7DIlMehHAkX7sZm2t1PvHlCs2tqg= X-Google-Smtp-Source: ABdhPJwpXz2+8PA5AqJo+nBVv+6ExNaiQDdlTJqj1ZTgg3azB0H5CFB1SuCKTAgN/AkWgNxx9BTAfw== X-Received: by 2002:adf:f582:: with SMTP id f2mr8881651wro.65.1635114639124; Sun, 24 Oct 2021 15:30:39 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id c15sm14386699wrs.19.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from ) id 1mem0j-005utI-Q5; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 7/7] Fortran: Delete unused decl in intrinsic.h Date: Mon, 25 Oct 2021 00:30:23 +0200 Message-Id: <20211024223023.1410274-8-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211024223023.1410274-1-rep.dot.nop@gmail.com> References: <20211024223023.1410274-1-rep.dot.nop@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill, gfc_resolve_kill_sub): Delete declaration. --- gcc/fortran/intrinsic.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h index 2148f89e194..7511daaaaf1 100644 --- a/gcc/fortran/intrinsic.h +++ b/gcc/fortran/intrinsic.h @@ -168,7 +168,6 @@ bool gfc_check_spread (gfc_expr *, gfc_expr *, gfc_expr *); bool gfc_check_srand (gfc_expr *); bool gfc_check_stat (gfc_expr *, gfc_expr *); bool gfc_check_storage_size (gfc_expr *, gfc_expr *); -bool gfc_check_sum (gfc_expr *, gfc_expr *, gfc_expr *); bool gfc_check_symlnk (gfc_expr *, gfc_expr *); bool gfc_check_team_number (gfc_expr *); bool gfc_check_transf_bit_intrins (gfc_actual_arglist *); @@ -459,7 +458,6 @@ void gfc_resolve_asinh (gfc_expr *, gfc_expr *); void gfc_resolve_atan (gfc_expr *, gfc_expr *); void gfc_resolve_atanh (gfc_expr *, gfc_expr *); void gfc_resolve_atan2 (gfc_expr *, gfc_expr *, gfc_expr *); -void gfc_resolve_atan2d (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_atomic_def (gfc_code *); void gfc_resolve_atomic_ref (gfc_code *); void gfc_resolve_besn (gfc_expr *, gfc_expr *, gfc_expr *); @@ -542,7 +540,6 @@ void gfc_resolve_rshift (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_lshift (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_ishft (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_ishftc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); -void gfc_resolve_kill (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_lbound (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_lcobound (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_len (gfc_expr *, gfc_expr *, gfc_expr *); @@ -658,7 +655,6 @@ void gfc_resolve_gmtime (gfc_code *); void gfc_resolve_hostnm_sub (gfc_code *); void gfc_resolve_idate (gfc_code *); void gfc_resolve_itime (gfc_code *); -void gfc_resolve_kill_sub (gfc_code *); void gfc_resolve_lstat_sub (gfc_code *); void gfc_resolve_ltime (gfc_code *); void gfc_resolve_mvbits (gfc_code *);