From patchwork Wed Mar 27 18:36:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 1916973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=golang-org.20230601.gappssmtp.com header.i=@golang-org.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=3M08Ix9r; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4b4W0yhtz1yWv for ; Thu, 28 Mar 2024 05:37:14 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 89492385E456 for ; Wed, 27 Mar 2024 18:37:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by sourceware.org (Postfix) with ESMTPS id 23330385843A for ; Wed, 27 Mar 2024 18:36:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 23330385843A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=golang.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=golang.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 23330385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711564609; cv=none; b=E8TqbTKGiOMUkzMx2i6xnADpob+VkAtW/wmfcqd6cqPa/+o3FUNuUpOokcGZe5rRK387Zy1eL1kubuOUR2rJYWQtcbnLx05NF3OlrTx2JNhaIuedP0B2Q3kh/fY7/MJ8DPT/f0bEugYmip28+8XVDDTU8Hx+oZykmj8UFf9fCkc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711564609; c=relaxed/simple; bh=wbwkHfxKHhY+GmYhLodFfX4tPQUWS2vhYD68GE+7c+w=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=V6uqzlaxpbvUvnSgb/ERx6uY1s8To0lUpf6T5ScfL0XrzjPmLg7A/dcQ283LS7XcYXB+B5DfOTje4EDJE+wV5xgrRHkuik6LleF6qXVmr7KlJ6G/rjIje/dwbSwinmoX8meHaurFutbvF4Y4JQKmfXeR/Rtt4pZddIptMT07JPE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-ddaad2aeab1so90893276.3 for ; Wed, 27 Mar 2024 11:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20230601.gappssmtp.com; s=20230601; t=1711564606; x=1712169406; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/UdDukhfXhSGzU0TV8BpWW0okEaSJKJDg4Z0jvkp69E=; b=3M08Ix9rGWz9eoTI0d/DU/Tz6mE5wO0NQ98df2kUHGPgf96Nr558kJdEuuyTNCanMh i216oMoKEOW0xgKOARHK9m46tw/9gT9TP17D9UryNrNjDd0pXWEOAAs8HTrbBwHf7ihz tERealCP3BpAr96A1GrTqG0BQhwd5LcvJIXCezf6rh9DzAJ2YDs5glhPChqNxEvBVREK Qcj6gLG3WpiNf+f1yz4MOdhLNxH4i/mwyyUiGKsXbkg/E66sWwdsuJGD+mii0rC60PFw lTUjvmZGIubpRivN99ITvhTkHCJ6OxZ9q7t8XT54YKMe5M5wRe7mVSGLOXulV2cks16z 82Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711564606; x=1712169406; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/UdDukhfXhSGzU0TV8BpWW0okEaSJKJDg4Z0jvkp69E=; b=AQ4Dq8hiPuqNT9bGXFAk41VkfEW6D4POHQShO1hF1p2ZbjdjA/jij/oHxG1qk0ErXv uUzuZ0hAKMxtUVoA/SPKESrm7t2dem3y8GMq8I6BTKCdyZTG3MgP61KI7LQf9cEWKee5 mygJGH6cfgnwHO0XhgafAnx3iw6P+mQ8FzVp5UEqsWUYz9sc0GKHOpYRrqwU1CSV9Tqx 6LxEBZb7UYG7ZOKu2DKhP86Xoch/UjLNuURzZuUQ6Aq5JQcnDnMBM8K6cotPEV8NzNR8 wuFNbNSBj6QxBkKXWP8IQ4WoJf19ejf8AGblUB2RlrYgxoj8hTMiMo0xNCvm84dmALor b+sg== X-Gm-Message-State: AOJu0YzcMI8tOZya9gEfuH0hIhmFeTCsupbECl1v0R9RY0cuKfMt3jN2 rq+lU3mCjf5YRRH8rd6/79Wlb/PPYAw+uAes5ghfcNIVtrkZVApjGOGWkhF/1s6wyAVlqJkK/7v CWLuLFDtoZjak9AbU3vuL8MoGtxkYcqeq4KecZokfvMKSA8oH X-Google-Smtp-Source: AGHT+IEFlr6IZYFfpzTOyjmNvwXedbCOjO8pXIdq+pnTmc6GOhOqMvu/JEWkc/tfgcQgrD8P3fuj7QMhh/wo69zFRI4= X-Received: by 2002:a5b:ecc:0:b0:dcf:56c1:5a12 with SMTP id a12-20020a5b0ecc000000b00dcf56c15a12mr668654ybs.38.1711564606073; Wed, 27 Mar 2024 11:36:46 -0700 (PDT) MIME-Version: 1.0 From: Ian Lance Taylor Date: Wed, 27 Mar 2024 11:36:34 -0700 Message-ID: Subject: Go patch committed: initialize local variable in lower_method_expression To: gcc-patches , gofrontend-dev X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This patch to the Go frontend fixes an uninitialized variables in lower_method_expression. This fixes GCC PR 114463. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 7b2a24f3964509bd5b74c4579c7ea5684e82aee1 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 73cb095322c..de6e21fb3b5 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -e15a14e410b8fc5d28012d5b313cb6c8476c7df9 +3f597287b6b858794dabdfe1bf83b386aad18102 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 51ff0206129..8429e553eac 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9059,7 +9059,7 @@ Selector_expression::lower_method_expression(Gogo* gogo) Named_type* nt = type->named_type(); Struct_type* st = type->struct_type(); - bool is_ambiguous; + bool is_ambiguous = false; Method* method = NULL; if (nt != NULL) method = nt->method_function(name, &is_ambiguous);