From patchwork Fri Feb 16 19:00:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andrew Pinski (QUIC)" X-Patchwork-Id: 202327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp722575dyb; Fri, 16 Feb 2024 11:01:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWbcFuJmFIDkyEmxt9Si+OocjKojp68n0dZQQkDyI4pDw9Qt/iq8D+utVPkxvIQ32Eait12ASPG6yE2NQb10or8vQJlMw== X-Google-Smtp-Source: AGHT+IF9iyPoHMbpj3FeCowuHSPEQBLMbYmtLkcadYW+cQSe1pCuCIgYN9HZAecfdfjyoHrIs8O5 X-Received: by 2002:a05:620a:1271:b0:787:2b5a:31b0 with SMTP id b17-20020a05620a127100b007872b5a31b0mr6103482qkl.71.1708110099899; Fri, 16 Feb 2024 11:01:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708110099; cv=pass; d=google.com; s=arc-20160816; b=MTTMH27CZjR06rV26FYTkpQXQn0gDgidj7koPpDiOz6C7S2EVF4spxugbRWGWiXbkF DnQmvbV6EJLkc4ShRd9AIAJd4TUhfYBswt3gwfGyMq4SHeEN4AoHSZbaUin+e0R1rp1F HGV2/G1JA7F7JAsSIOGFH+VkAxVYvI13umQ736XUd8MH7+hckA9oDy7cEj7kkGvfwtFX xrTxiGRxHPYmCf4sMHUwRO4B+Jp4NCv0yXtL20zz3WG6fQ5GHD2zDERHDQY1yV5796fT Ac3u/szs/4BlA72WOCB+cA+JfnjkWewzFT3n+k3urNM/QOOpR1fg6y458a1cxdVZuUjo z5Hw== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Nmg5qY0iW6aN4NWWH9BZ8EFX4+KcFY7ymmFAwspnkpM=; fh=o3CEdS3yGN/eIa89Zn0Kf01WYLxTE9IjKuSQGVPeOHI=; b=gCXXa07r/GjFNiPUksQKKiOCJyU31m90WDnYZd7GUew2Nhzbm8xNZYKdnM0pSUr7xm z6JIdg/UpiHTy8cxJZ+uEJsTDWxliXG/AZXmq7VzS6MyGBdrfpIFHi8M1Ih4wjw0bcx5 pbrGJ3ZS2Tav4Q5joV8uk5lT0R4JT5DrqqIuCpgf5CMzlSW12CCapmcp6y3kVpNLFnEf EdaHeUalUQXJvBMG4cFQPaWgS5NtAncah/yRdMTPRQRcmU7E8yyow5+w01LbkjAsk2Be kIzxgdw6+dUmwNVIR+N5YUtrM6zEyzlrdq/pbpr1quwDEEWxhqGiQBtqwx7YrOIZD0/q VJhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jHqbEzNo; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r24-20020ac867d8000000b0042c140acf84si394998qtp.399.2024.02.16.11.01.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 11:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jHqbEzNo; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BB793857830 for ; Fri, 16 Feb 2024 19:01:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by sourceware.org (Postfix) with ESMTPS id 44E17385803B for ; Fri, 16 Feb 2024 19:00:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44E17385803B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 44E17385803B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708110059; cv=none; b=OUdB26oMD8tjQ2fYi8jSL2apDADybONL+Kjm94uhLISFIRK92J6jwo7FJxps5tyKjJNRzyb4pXoPrCkLzXy7SnwwpUvIS4T2wCO2nXMSSGsTCDTZsExmJPInw8ROmCzNuSe0BnYdzBUA8apQi/U/gMzdgObPthD04CwzrVx5ud4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708110059; c=relaxed/simple; bh=Kp0YmVuAsps/iIzOeDQ5VLTicoXyd28emgEndQdNhLU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Oa73cVtrNyhUN6xzcJyw57E4jFNGTmRdYWwPuWStVVZwYILrcWReRJRMT1pl7yBb6L04XkpGuY97l/E4ccX/iIwKa86xwMHWBMINDRg3Y3d+jwGiX8ylDV+eSC49f3cnFMqB5TsqCyk8M31wj83f1VfhtpmjgZpaqNBwDEMwBFU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41GIdwnG019197 for ; Fri, 16 Feb 2024 19:00:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=Nmg5qY0 iW6aN4NWWH9BZ8EFX4+KcFY7ymmFAwspnkpM=; b=jHqbEzNofT91m3FxEwTUeE1 38xwxSbQuaJiNlF8cuVgcT6rn6dQ9s0AjuMp9NCzno1WhZcSwIPhLM4+z9gS6yPj QN64TY+wsHU4u6NdwhQ51kmQZUFxqvuJf+ueHN/yyxsYxYaZ+xryo/m8sH3MbjM7 SPlEg0ocPvSL4S0g3I42z0LQjYuhjiSWxRF/p9dZZavdFdpg7E6HvYADwClWZsQn 6A6kgw4kqBz4nm4SFWh2R4qxiZaNv8O9j2GCEV1Kc93ewAuSkOFLReNYgAuQLyFo 1qST1tadrZYWqku1Rwm37X9ju057QeicIkfQCTo1AYIbCGAigc7PVUNA11U9/uw= = Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wa51xh3gv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 16 Feb 2024 19:00:55 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41GJ0tZ7023074 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 16 Feb 2024 19:00:55 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 16 Feb 2024 11:00:54 -0800 From: Andrew Pinski To: CC: Andrew Pinski Subject: [COMMITTED] c++: Add testcase for this PR [PR97990] Date: Fri, 16 Feb 2024 11:00:34 -0800 Message-ID: <20240216190034.2684983-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ZACM37y851ZEX7pkbKcjJwf2pOz4Ko9V X-Proofpoint-GUID: ZACM37y851ZEX7pkbKcjJwf2pOz4Ko9V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-16_18,2024-02-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 impostorscore=0 mlxlogscore=921 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402160149 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: 1791083255723157724 X-GMAIL-MSGID: 1791083255723157724 This testcase was fixed by r14-5934-gf26d68d5d128c8 but we should add one to make sure it does not regress again. Committed as obvious after a quick test on the testcase. PR c++/97990 gcc/testsuite/ChangeLog: * g++.dg/torture/vector-struct-1.C: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/torture/vector-struct-1.C | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/torture/vector-struct-1.C diff --git a/gcc/testsuite/g++.dg/torture/vector-struct-1.C b/gcc/testsuite/g++.dg/torture/vector-struct-1.C new file mode 100644 index 00000000000..e2747417e2d --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/vector-struct-1.C @@ -0,0 +1,18 @@ +/* PR c++/97990 */ +/* This used to crash with lto and strict aliasing enabled as the + vector type variant still had TYPE_ALIAS_SET set on it. */ + +typedef __attribute__((__vector_size__(sizeof(short)))) short TSimd; +TSimd hh(int); +struct y6 +{ + TSimd VALUE; + ~y6(); +}; +template +auto f2(T1 p1, T2){ + return hh(p1) <= 0; +} +void f1(){ + f2(0, y6{}); +}