From patchwork Mon Oct 23 21:03:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 157097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1552646vqx; Mon, 23 Oct 2023 14:04:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHg9Ns8tnkAHuvt2ngKvVwtXpKlpUXy5QyRiaZT/xy1t3SGZYvc0ZdQxFA7yWB2VpAniGqd X-Received: by 2002:a05:6870:3b8e:b0:1e9:bfe7:e842 with SMTP id gi14-20020a0568703b8e00b001e9bfe7e842mr13738060oab.32.1698095067181; Mon, 23 Oct 2023 14:04:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698095067; cv=pass; d=google.com; s=arc-20160816; b=HW43coy+swlG6K/hvcw0hbHimF13uhXx0q+aA0rib4SQiJ22TndRXnl4gNSyAREluZ gu18PuDMhHuecDj6IlyFuj3qz29fhCqwm9hUAp6JYtz/CxxW3vwktLsTvuMSw3T7CfL9 AWymRckDKBNJkPYN4EefBfpV4Hfed2cBaTf06ba3zTa5XeC9z2tyvqmsBFP/yihlWZTP dJ3Sys1vSjXmP79GsznaBNTauVwTycoJe+61joAmmvfeNHUkqedAJUq54kZqDUUdX7hm U6RNb/0MPigsuBqrq/u3yL8Up7rkRs4zJ/rN+MonB/vSP2eoZ8keG3hs7p3YyOFyti86 zi1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:subject:message-id:date:from :mime-version:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=oz2empU3Z15quYUWI2vVZVTD20gjfREu9DomXEAPI6Y=; fh=sx1AF6BoRLLvWrm7PiL2RBt/kekZxFGoFwZKL1Ho560=; b=youI9ifbjbrJljOAqwUE5QdK/dXyIf+f4aLp5BUdAv58pufMPIENQFb5gj8jBPdtQt 3bhObQf4oeriQ7DqfjKgFGk5SdH5kSLkSMQaHHkKNJEorJxuGqVazqsREwLvoHA7w3b7 tEP2mu8pt46zHd5lAgPh/lPJfuUgk7DFV6/xhejQkfRnPhGk6bTEuRTkkUrrJNU65JrD SGdznI4RLTLgGY3YFc7uKQEeXf8s8Kc9jJN7Jxt35uNVfPmehDy8q27HJ0rpC5YYmBjx LJlvXdRG7wgwECyAePpn0xIs+U1msoZyG/WGIeH19G7JIvY7i3p9HPAzgJoFR5UjYFKe xdmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@golang-org.20230601.gappssmtp.com header.s=20230601 header.b=fVsgNh7n; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=golang.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p3-20020ad451c3000000b0065b1160dbb6si6018765qvq.440.2023.10.23.14.04.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 14:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@golang-org.20230601.gappssmtp.com header.s=20230601 header.b=fVsgNh7n; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=golang.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8DC6385B53C for ; Mon, 23 Oct 2023 21:04:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by sourceware.org (Postfix) with ESMTPS id D7D3E385840C for ; Mon, 23 Oct 2023 21:04:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7D3E385840C 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 D7D3E385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698095043; cv=none; b=JEKYHZgNt/1frWqabkamSOD3mpqWLWJpaFlTRV13SThUmy2Hu13DUdTJ1R3l/RcFji37PnEPUk3wZjRI+uasoAk58W/MZ/Evh81TRgHGvIBao7/USd5jTU1RToJiAHUpGfm/30116w4n54RaQ7weYmmfv1+3ew0skPNQnR2fjQk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698095043; c=relaxed/simple; bh=y/29moWCKnHI/DMq1qseVJSvOuu/TFlSPgtO8wJXp3A=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=l/3y7Z+lOFo1WXC2v25hnooXrGBB7xBUPT7UIQepVofzKUXMQugkCZ5Iiu0G8MxH8fZwAGOHVasnwJ5WJ9DJ0mn/5Wzc1I+Zt6aqZEQv2gkwU9Mvad6TxHoQ0P5TltJEP4W6sVmi5N4HD+ikhzhfJjQH7odLuzxQ0Kq/h2L4Gw4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-d9c2420e417so3576859276.2 for ; Mon, 23 Oct 2023 14:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20230601.gappssmtp.com; s=20230601; t=1698095041; x=1698699841; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oz2empU3Z15quYUWI2vVZVTD20gjfREu9DomXEAPI6Y=; b=fVsgNh7nLNOwzH2QbEdefIHWnNpasq+Gq64giiwBlUeRNCoJbNuGHHxx8ec/63mwEu X4Q4+qQQmbsxGaMkiidlB7e9lnE0jH/MvVYCdcMCW0xgJdhzQQD2DvzEiE7D+i/YSUmQ sVYA5uai9MqLZq2ozkxz2EKpK2ReBzKmcTjPlg1IOBJuJVt5sxzAcgxPQaGqlE0qFXjl o4txj9dbW1iPiQN+bOD6hPu4rxry8zExb5Ry6hZTZ5/YT+X3EYJG25qwUG00XUsTXt1O tG24ypOPmGGPDW/epK5kJKFMDXMQ1SkI51TN0pndFCy54Irk0CbdGVaYFs+I2PiDkf// jTMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698095041; x=1698699841; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oz2empU3Z15quYUWI2vVZVTD20gjfREu9DomXEAPI6Y=; b=E8XsgL3kgACm1LJNBQRgCHF7bPtiPih6HuBcyicmmDabptcV8ONv4gAH3tarNp2MNm d88gGPVEP91/xAJiG3JGNRvUQJSVNcmV7IB4YwIzIIpP+Inh7LifwRV9jfk9r0n0ZuZj CCjhNuVpNqjaiMfVf8o+m3NUJO7ZfGu2nPg1U/j/GOv9josj2bG96lsTtQiFoUibaIRA WtXJPmzzpUfhD0Y0lsiZPWEwSjCPKUqfmurwW4SG7RRDDi7fQX9YIHPfknCym4iETYE8 dGmTQVBSji53qoockbHoIL+joZKWwWfeHwTTpkQCiopv34amuvFzz2sYQD2kLkhjqU7A IWAw== X-Gm-Message-State: AOJu0YytPu1fH1eS/XGUH97ma3vZs4JSOlqOse+8yyrbZo88yBLt8x6X YFjnhyS0RfFleGkCyhLsWsVUV8pIQFQoLwE1egBdSNdQcg0qJkleeMM= X-Received: by 2002:a25:c552:0:b0:d9a:e9c5:cf2c with SMTP id v79-20020a25c552000000b00d9ae9c5cf2cmr10211797ybe.54.1698095040839; Mon, 23 Oct 2023 14:04:00 -0700 (PDT) MIME-Version: 1.0 From: Ian Lance Taylor Date: Mon, 23 Oct 2023 14:03:49 -0700 Message-ID: Subject: libgo patch committed: Add missing type conversion To: gcc-patches , gofrontend-dev X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780581733270792524 X-GMAIL-MSGID: 1780581733270792524 This libgo patch adds a missing type conversion. The gofrontend incorrectly accepted code that was missing a type conversion. The test case for this is bug518.go in https://go.dev/cl/536537. Future CLs in this series will detect the type error. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2621bd1bac614b63e52d0deb4ab2ff287a9fafa8 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 398d2671b64..0f961157dfd 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -c201fa2a684ada551ca9a0825a3075a0a69498de +081ec9824a74ec9d82628d8d2f6b9a7a4c35a529 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go index 9f688e2a0c7..02f228adc59 100644 --- a/libgo/go/syscall/errstr.go +++ b/libgo/go/syscall/errstr.go @@ -24,7 +24,7 @@ func Errstr(errnum int) string { } return string(b[:i]) } - if errno != ERANGE { + if Errno(errno) != ERANGE { return "strerror_r failure" } }