From patchwork Wed Sep 18 08:26:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1163827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509165-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="n/ZvM/nN"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46YCl65kj8z9s4Y for ; Wed, 18 Sep 2019 18:27:12 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Igpkb/O36ywTDDwT3g6I9S4/NkdayZY515puNqyYKerx361rS2 6BwK/FCCZNvHHJ5wAqHf+/nV1YWX7BTlwzoIyQsrobqrMv6osgbWlTYTPIY3OXuq s7uvaX2gSyT3fk8SINalNJjNXY/J1uA0NSWpUHCifLFUcZhxqeyBTMrM8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=XQ7MtpPTRg7s7mEjkNp0UmngXcw=; b=n/ZvM/nNACV94B4ilcKu 73tL06D6fCH5CwhAKvbf9wZLO1njnCx8FbUMYf1tx8IDKyV67wjEOzFfjXuJG7mO +2FazJphH/v7cOKzT6sFLPOBVfbYERv+iZMIXrJrd6fME/GnI5rTFDkivUDD+ZU0 JuEbZ6VSUbcGgOQz77cWS8o= Received: (qmail 56791 invoked by alias); 18 Sep 2019 08:27:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56567 invoked by uid 89); 18 Sep 2019 08:27:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=1, 20 X-HELO: esa2.mentor.iphmx.com Received: from esa2.mentor.iphmx.com (HELO esa2.mentor.iphmx.com) (68.232.141.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 08:27:01 +0000 IronPort-SDR: hSgoqOR/tmPwlyCBZXyzb27zpySBWKxuuuM3HQfprEfAf+q1EjtA3B2qh2e3Cr0wMHjjaONA+z sQW4jmPGHSuq+XX/HZEBvP6Xvu0FrJA4KGUR+NG2WrZgKvZi0Y8vtWeoLpmW+a1WylB94WDNoV hm7voJvJ6huWmHZwe7lZQrOzN+yGuF17hBFYDj/4dxl4e+wBsyC+hxyqpI1UmQfFud8EzZPijv kTIX0+8r3+ThWossFCnDTCoMbY2FJMCXbcEypxePvuZaVa5CPKtQ0O+FA/7UkVYhC/B7f+1Xju R/w= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 18 Sep 2019 00:26:38 -0800 IronPort-SDR: sKLiT1BuEkU9EGbwvWZURM1t8GHconCpAS9bFE7xUsmwHz+jOTFXqKeveU1q5B4ziecDBdwvrP 8P0r5HtjVE2U/CsOeasx1Vp+jRLtAT1HUElBGuIP8m/gfRQLXeTzaXYpVZ11yE1/VRLChj3icw /SZIL51tgK2OhA/XddKsPHn0zVo8zluqlbeP4g0XqxxbpSR4pSvwWmGdEQFxUylmZCc98Mj8al mq+aJPQ4MgC7uE/0rZ3psS9bhCFs6jpB9DZbTHJ+Lo+7zSBbdiWq1l2gKkjJYvZZBKsEdB+G+O /UA= To: CC: Andrew Stubbs , Thomas Schwinge From: Tobias Burnus Subject: [patch,committed][OG9] Fix compiler warnings Message-ID: Date: Wed, 18 Sep 2019 10:26:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 X-IsSubscribed: yes Committed the following patch to silence compiler warnings – some pointed to issues, which are now fixed. Tobias commit 500483e6ced44e2e0fea6a37e4f8c267ebaf826a Author: Tobias Burnus Date: Wed Sep 18 08:44:20 2019 +0200 Silence compiler warnings gcc/ 2019-09-17 Tobias Burnus * config/gcn/gcn.c (gcn_expand_scalar_to_vector_address, gcn_md_reorg): Remove unused statement. (gcn_emutls_var_init): Add missing return - after sorry abort. * config/gcn/gcn.md (movdi_symbol_save_scc): Fix condition. * config/gcn/mkoffload.c (process_obj): Remove unused variables. * gimplify.c (gomp_oacc_needs_data_present): Likewise. (gimplify_adjust_omp_clauses): Fix condition by adding (). * omp-low.c (process_oacc_gangprivate_1): Comment unused parameter name to silence unused warning. * omp-sese.c (omp_sese_number, omp_sese_pseudo): Remove superfluous (). (oacc_do_neutering): Use signed int to avoid a warning. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call, find_func_clobbers): Use unsigned to silence warning. gcc/fortran/ 2019-09-17 Tobias Burnus * trans-expr.c (gfc_auto_dereference_var): Use passed loc argument. diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc index 8f3aee75449..fe584959153 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,20 @@ +2019-09-17 Tobias Burnus + + * config/gcn/gcn.c (gcn_expand_scalar_to_vector_address, + gcn_md_reorg): Remove unused statement. + (gcn_emutls_var_init): Add missing return - after sorry abort. + * config/gcn/gcn.md (movdi_symbol_save_scc): Fix condition. + * config/gcn/mkoffload.c (process_obj): Remove unused variables. + * gimplify.c (gomp_oacc_needs_data_present): Likewise. + (gimplify_adjust_omp_clauses): Fix condition by adding (). + * omp-low.c (process_oacc_gangprivate_1): Comment unused + parameter name to silence unused warning. + * omp-sese.c (omp_sese_number, omp_sese_pseudo): Remove + superfluous (). + (oacc_do_neutering): Use signed int to avoid a warning. + * tree-ssa-structalias.c (find_func_aliases_for_builtin_call, + find_func_clobbers): Use unsigned to silence warning. + 2019-09-10 Julian Brown * config/gcn/mkoffload.c (process_asm): Remove omp_data_size, diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index f8434e4a4f1..e0a558b289a 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -1766,7 +1766,6 @@ gcn_expand_scalar_to_vector_address (machine_mode mode, rtx exec, rtx mem, /* tmp[:] += zext (mem_base) */ if (exec) { - rtx undef_di = gcn_gen_undef (DImode); emit_insn (gen_addv64si3_vcc_dup_exec (tmplo, mem_base_lo, tmplo, vcc, undef_v64si, exec)); emit_insn (gen_addcv64si3_exec (tmphi, tmphi, const0_rtx, @@ -3167,6 +3166,7 @@ tree gcn_emutls_var_init (tree, tree decl, tree) { sorry_at (DECL_SOURCE_LOCATION (decl), "TLS is not implemented for GCN."); + return NULL_TREE; } /* }}} */ @@ -4292,8 +4292,6 @@ gcn_md_reorg (void) { basic_block bb; rtx exec_reg = gen_rtx_REG (DImode, EXEC_REG); - rtx exec_lo_reg = gen_rtx_REG (SImode, EXEC_LO_REG); - rtx exec_hi_reg = gen_rtx_REG (SImode, EXEC_HI_REG); regset_head live; INIT_REG_SET (&live); diff --git a/gcc/config/gcn/gcn.md b/gcc/config/gcn/gcn.md index 537bb260ff7..1f328528e4a 100644 --- a/gcc/config/gcn/gcn.md +++ b/gcc/config/gcn/gcn.md @@ -840,7 +840,7 @@ [(set (match_operand:DI 0 "nonimmediate_operand" "=Sg") (match_operand:DI 1 "general_operand" "Y")) (clobber (reg:BI CC_SAVE_REG))] - "GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == LABEL_REF + "(GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == LABEL_REF) && (lra_in_progress || reload_completed)" "#" "reload_completed" diff --git a/gcc/config/gcn/mkoffload.c b/gcc/config/gcn/mkoffload.c index 593274bf054..c96ed23a2a6 100644 --- a/gcc/config/gcn/mkoffload.c +++ b/gcc/config/gcn/mkoffload.c @@ -367,8 +367,6 @@ process_obj (FILE *in, FILE *cfile) { size_t len = 0; const char *input = read_file (in, &len); - id_map const *id; - unsigned ix; /* Dump out an array containing the binary. FIXME: do this with objcopy. */ diff --git a/gcc/fortran/ChangeLog.openacc b/gcc/fortran/ChangeLog.openacc index 576e33fd567..a54fb4e4614 100644 --- a/gcc/fortran/ChangeLog.openacc +++ b/gcc/fortran/ChangeLog.openacc @@ -1,3 +1,7 @@ +2019-09-17 Tobias Burnus + + * trans-expr.c (gfc_auto_dereference_var): Use passed loc argument. + 2019-09-06 Andrew Stubbs Backport from mainline: diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 7dc5ada9b6b..4a3bd9acd65 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -2576,7 +2576,7 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, && (sym->attr.dummy || sym->attr.function || sym->attr.result)) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); } else if (!sym->attr.value) { @@ -2587,7 +2587,7 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, if (!descriptor_only_p) var = GFC_DECL_SAVED_DESCRIPTOR (var); - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); } /* Dereference non-character scalar dummy arguments. */ @@ -2597,14 +2597,14 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, || (!CLASS_DATA (sym)->attr.dimension && !(CLASS_DATA (sym)->attr.codimension && CLASS_DATA (sym)->attr.allocatable)))) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); /* Dereference scalar hidden result. */ if (flag_f2c && sym->ts.type == BT_COMPLEX && (sym->attr.function || sym->attr.result) && !sym->attr.dimension && !sym->attr.pointer && !sym->attr.always_explicit) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); /* Dereference non-character, non-class pointer variables. These must be dummies, results, or scalars. */ @@ -2617,7 +2617,7 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, || sym->attr.result || (!sym->attr.dimension && (!sym->attr.codimension || !sym->attr.allocatable)))) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); /* Now treat the class array pointer variables accordingly. */ else if (sym->ts.type == BT_CLASS && sym->attr.dummy @@ -2627,7 +2627,7 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, && CLASS_DATA (sym)->as->type == AS_ASSUMED_RANK) || CLASS_DATA (sym)->attr.allocatable || CLASS_DATA (sym)->attr.class_pointer)) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); /* And the case where a non-dummy, non-result, non-function, non-allotable and non-pointer classarray is present. This case was previously covered by the first if, but with introducing the @@ -2642,7 +2642,7 @@ gfc_auto_dereference_var (location_t loc, gfc_symbol *sym, tree var, && (sym->assoc || !CLASS_DATA (sym)->attr.allocatable) && !CLASS_DATA (sym)->attr.class_pointer) - var = build_fold_indirect_ref_loc (input_location, var); + var = build_fold_indirect_ref_loc (loc, var); } return var; diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 60761504a5e..d16611d3617 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -9757,7 +9757,6 @@ static oacc_array_mapping_info * gomp_oacc_needs_data_present (tree decl) { gimplify_omp_ctx *ctx = NULL; - bool ref_p = TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE; if (gimplify_omp_ctxp->region_type != ORT_ACC_PARALLEL && gimplify_omp_ctxp->region_type != ORT_ACC_KERNELS @@ -10437,8 +10436,8 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p, /* OpenACC reductions need a present_or_copy data clause. Add one if necessary. Emit error when the reduction is private. */ - if (DECL_P (decl) && ctx->region_type == ORT_ACC_PARALLEL - || ctx->region_type == ORT_ACC_SERIAL) + if (DECL_P (decl) && (ctx->region_type == ORT_ACC_PARALLEL + || ctx->region_type == ORT_ACC_SERIAL)) { n = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); if (n->value & (GOVD_PRIVATE | GOVD_FIRSTPRIVATE)) diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 4b21769a9a7..18ad6386f27 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -11204,7 +11204,7 @@ lower_omp_grid_body (gimple_stmt_iterator *gsi_p, omp_context *ctx) /* Find gang-private variables in a context. */ static int -process_oacc_gangprivate_1 (splay_tree_node node, void *data) +process_oacc_gangprivate_1 (splay_tree_node node, void * /* data */) { omp_context *ctx = (omp_context *) node->value; unsigned level_total = 0; diff --git a/gcc/omp-sese.c b/gcc/omp-sese.c index d6f1e8edd62..d7267017677 100644 --- a/gcc/omp-sese.c +++ b/gcc/omp-sese.c @@ -1346,7 +1346,7 @@ oacc_do_neutering (void) vec prop_set; prop_set.create (last_basic_block_for_fn (cfun)); - for (unsigned i = 0; i < last_basic_block_for_fn (cfun); i++) + for (int i = 0; i < last_basic_block_for_fn (cfun); i++) prop_set.quick_push (0); find_ssa_names_to_propagate (par, mask, worker_single, vector_single, @@ -1638,7 +1638,7 @@ omp_sese_number (int n, int p, int dir, basic_block b, size_t offset = (dir > 0 ? offsetof (edge_def, dest) : offsetof (edge_def, src)); edge e; - edge_iterator (ei); + edge_iterator ei; FOR_EACH_EDGE (e, ei, edges) { @@ -1661,7 +1661,7 @@ omp_sese_pseudo (basic_block me, bb_sese *sese, int depth, int dir, vec *edges, size_t offset) { edge e; - edge_iterator (ei); + edge_iterator ei; int hi_back = depth; pseudo_node_t node_back (0, depth); int hi_child = depth; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index ebdf31e241e..17f2d3daf12 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4711,7 +4711,7 @@ find_func_aliases_for_builtin_call (struct function *fn, gcall *t) fnpos = 1; argpos = 3; if (targetm.goacc.explode_args ()) - for (int i = 6; i < gimple_call_num_args (t); i++) + for (unsigned int i = 6; i < gimple_call_num_args (t); i++) { tree arg = gimple_call_arg (t, i); if (TREE_CODE (arg) == INTEGER_CST @@ -5288,7 +5288,7 @@ find_func_clobbers (struct function *fn, gimple *origt) implicit_use_args[num_implicit_use_args++] = 4; implicit_use_args[num_implicit_use_args++] = 5; if (targetm.goacc.explode_args ()) - for (int i = 6; i < gimple_call_num_args (t); i++) + for (unsigned int i = 6; i < gimple_call_num_args (t); i++) { tree arg = gimple_call_arg (t, i); if (TREE_CODE (arg) == INTEGER_CST