From patchwork Wed Mar 29 00:31:38 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: 67059 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 9F6003858024 for ; Wed, 29 Mar 2023 00:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F6003858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680049944; bh=jfiGNtdioaXa2XsIzrGNdF9tYtLwedwDnflUGNVzGUo=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=eAygRz2rlr3IDO2g9LPL16HQ5qkGmcECFLOfce0avhe4yTvvRTle0FznnMZh4Xjny 9aokMJtwArhDCGx176pWFMBu8qTothQE8k74mV930vXKaML/OtoNIEvWqzuhNCwa6o wLxTTPWIEKbMyppMnqSO2VGsbhxvC4b84hUCh/Yg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 19E0F3858C50 for ; Wed, 29 Mar 2023 00:31:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19E0F3858C50 Received: by mail-pl1-x62c.google.com with SMTP id c18so13337842ple.11 for ; Tue, 28 Mar 2023 17:31:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680049911; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jfiGNtdioaXa2XsIzrGNdF9tYtLwedwDnflUGNVzGUo=; b=4nm7BUYisJsVNFiOrPnmGwhYk+vdTpxLCHkY0cW5d00y19CU0iBioa6a32hAVcHuDa YRwoF4+2xSuXAOXNE6sjl3GoeNa3U1zl1mdSvC6v3GNje3doizmiYOwknNXio7krleTB W9ipcYldVjdJuqBvpYaVXADI48Sk9wglYMt/LLOfnKvUeyw6GB2nvauyG1nRCI7Ov6U5 NnW4qvncs20Xj+DAtPgzvbLVqZ8NNLmBMF7MEgMiWVD2ZzJKz74jc8OGFx9ff8r2jC82 HoAdbfO/nA1WJozqWEmh0jVN/6xwuV9bgavbcGuWHvxMFHEHuk9W+lsJj45TM6Q+o0Yo 6IrA== X-Gm-Message-State: AAQBX9e943r98jJbWQwD6kpzwjqXfnDDif/yBHoBU+TejLGr7moszsL5 0SM8VwpD5A/0JF4+HTQZQp+2JMipVuNcvUClDmo0fvyhQdlLKJRNJyg= X-Google-Smtp-Source: AKy350btG+LrK/YcbCV3ocm0YpJiXqFo7wk59pBqcV/Rk//0Hj/n38Do5aEYmLqegt7/vsFElkjqGtHTZr6eeA3RFDQ= X-Received: by 2002:a17:903:2792:b0:1a0:6b23:7b55 with SMTP id jw18-20020a170903279200b001a06b237b55mr5768749plb.4.1680049910639; Tue, 28 Mar 2023 17:31:50 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 28 Mar 2023 17:31:38 -0700 Message-ID: Subject: Go patch committed: Mark Call_expression multi-results as result struct To: gcc-patches , gofrontend-dev X-Spam-Status: No, score=-9.7 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ian Lance Taylor via Gcc-patches From: Ian Lance Taylor Reply-To: Ian Lance Taylor Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch to the Go frontend marks a Call_expression multiple results struct as a result struct. In https://go.dev/cl/343873 we stopped padding zero-sized trailing fields in functions that return multiple results where the last result is zero-sized. This CL makes the corresponding change on the caller side. The test case is https://go.dev/cl/479898. This fixes https://go.dev/issue/55242. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian c8e7c9c973e6b0b3a3a061619831bc5df371f2ef diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 8c8025dec2e..addef6f8f51 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -9ffd6e679ff0e3a908d0ec2ed5c6efa1de827c3f +63ba7dd52f2cc49dab4b70ac81309296a920d4dc 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 53901306ef7..4ac55af7433 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -11267,6 +11267,7 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, Struct_type* st = Type::make_struct_type(sfl, loc); st->set_is_struct_incomparable(); + st->set_is_results_struct(); this->call_temp_ = Statement::make_temporary(st, NULL, loc); inserter->insert(this->call_temp_); }