From patchwork Wed Apr 5 14:04:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 79740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp371884vqo; Wed, 5 Apr 2023 08:01:43 -0700 (PDT) X-Google-Smtp-Source: AKy350YOErbyyYkr2pLngImccceEFFyep2Y2nBGc6wcWHpg6LH4trV4WYC3RuAc11Z4oS+ox+t4s X-Received: by 2002:a17:906:c407:b0:931:a321:7640 with SMTP id u7-20020a170906c40700b00931a3217640mr3119366ejz.74.1680706903500; Wed, 05 Apr 2023 08:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680706903; cv=none; d=google.com; s=arc-20160816; b=datMY9fnUvVaIHRLompvxgjuIijASNDGZMAjUMbNFzhdPA9O2yCPeBk1IDH+l8ZjvB DOl4rZhVTOH+ii+1NZ+T7LBpMxNiqIPJvT1Jq2KYAl/aH8Srjdns6bcSk5JAQFTo8jGN ciDYzpAu1JwIKVULTQQZa+kOVungrVN2Ywu3pGDhbPJPjJOiJUJjqocDjcZT6ozfkX+1 DeTEmx1ALBJHENmW14dp4S3J+Z7pHQNvkrABEFzqh6fPc88kRs1xpzNMIEkIVnG4j+wr irP+YOoo8VeBJpgG3XPAOq0VpWdLIJSB4Dw3V0yqxQNjbquqdzlPpX8rTOmuJV73Ovh8 g+YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=6dO+dsCZ3Kavj0sM3nuKp6iCDU0g9Ri1Ro/meGoQHyc=; b=pbf2jBBCzMQXtNkX346FlDqMg1dgAwYD7KhyOINdv1Dbabr93Q/KAj4OypWXqiOe40 AbwECiYEoTgQ89WqN9OuQscCchH4RNF9nJzX9yYrHaIOVpdcnsUaysvyWgtNLYfD9GZ/ qK8uMF2TcWoyyGnTQSr2ouHdTx0LZ+GVAJDLkxDtMTTSTV9F+BzfV2UT2iKjzlEcTJWg PedFUFhbxvSbajmdXvVqdVgmzo2GjjB1NICAH6vX3+FdRzb8XcIfxKeqG7ZM/2Mf1/bB 2EAcStaVllprFAkdWYhVR8xe3IGj8Y6jYmwErBXv7X0Sv67e7x2SlTyKOYwqq6dVrw5Q +hgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=eHEymP7+; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e3-20020a170906374300b0093deb6d10a0si281788ejc.757.2023.04.05.08.01.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 08:01:43 -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=@embecosm.com header.s=google header.b=eHEymP7+; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE86838CBE96 for ; Wed, 5 Apr 2023 14:23:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id DC1873881D01 for ; Wed, 5 Apr 2023 14:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC1873881D01 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x32f.google.com with SMTP id o32so20950698wms.1 for ; Wed, 05 Apr 2023 07:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703586; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=6dO+dsCZ3Kavj0sM3nuKp6iCDU0g9Ri1Ro/meGoQHyc=; b=eHEymP7+Edg62ySfPpHx3a1JEKkuvt9ybmHcerV7iniKVk/1OhYpgYti4yzKvK7y79 z1hRZQC+qApHt9o793/Jqa/lON1CH7fawKs6gZ3/tn22kuCgkc4IVpuUvOZKPQMtqKgw r9W/BTWH4lF0oNBOisoBv8PxD1OroYgja0lqX8GyEsOpNyaQSqru2o/p/JTzvAfgEyD0 3VLKZITTSFEV/ui9ilasZgQ39LF64RUXdLxga0InkEckrLfofX8+DFmgPp4bveZH4m9R GsINL2HTpMTyyU/1alzbh08mZYF82rEn3PVTR5ZBRbwJFlKWGEANAt2e8mCsQdVBF9PS rf8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703586; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6dO+dsCZ3Kavj0sM3nuKp6iCDU0g9Ri1Ro/meGoQHyc=; b=5L8X6xe8hIdxpVUJ8KJMj4idOthMVOi6bHcbvEqhBCyLAtAv9pov34DB3ASafyAHCZ SbrKRp6MDzuSZgsmNC1SulwRrxCZYkKCO8xa6gD0XgnKFJEVPMmYannuYh+CZLqeYH7c W/PhCIliIJtfuaF6nZ7OdHVjzdijkUMMKFUHHUlH3B4ALu/x91RwmF1RVx7GB9PVkinL 9CduNzMxggrwzVKqhDtwWffeyRWc2bpavqJnnP9z79/WgUSORZCSIEa4yG5qagbzUXBk f4gNwNmUkrqEB+F5NsCkZt6yco8EtX2EYNN+P2dUNMOCstt+krh4OzWL8eDbLdQAPnxw cfrA== X-Gm-Message-State: AAQBX9e3SSVmQ8MzBaPEsgUvhDmBw8IdsT72ElmkQmLDg+0DOAnbzwmd LWBHZbtWlP3jEUuvlShUNj4pYrjp6HGgbougCQ== X-Received: by 2002:a05:600c:d9:b0:3ed:b349:e473 with SMTP id u25-20020a05600c00d900b003edb349e473mr4768833wmm.37.1680703586302; Wed, 05 Apr 2023 07:06:26 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:06:25 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron Subject: [committed 83/88] gccrs: add test case to show our query-type system is working Date: Wed, 5 Apr 2023 16:04:07 +0200 Message-Id: <20230405140411.3016563-84-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405140411.3016563-1-arthur.cohen@embecosm.com> References: <20230405140411.3016563-1-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762348921755313302?= X-GMAIL-MSGID: =?utf-8?q?1762348921755313302?= From: Philip Herron Fixes #1361 Signed-off-by: Philip Herron gcc/testsuite/ChangeLog: * rust/compile/issue-1361.rs: New test. --- gcc/testsuite/rust/compile/issue-1361.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-1361.rs diff --git a/gcc/testsuite/rust/compile/issue-1361.rs b/gcc/testsuite/rust/compile/issue-1361.rs new file mode 100644 index 00000000000..f8909727216 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1361.rs @@ -0,0 +1,8 @@ +// { dg-options "-w" } +fn foo() -> S { + S { a: 15 } +} + +struct S { + a: i32, +}