From patchwork Sat Jan 20 19:43:45 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: 189764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1777807dyb; Sat, 20 Jan 2024 11:44:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcA5vW+E2lR7bPynpyMVVoGix8EF86L4lbjQPxQkb53ThA5Ixa/UK7A6mPK4hm28jaLWye X-Received: by 2002:a0c:e186:0:b0:681:8033:6ad1 with SMTP id p6-20020a0ce186000000b0068180336ad1mr2096125qvl.52.1705779887134; Sat, 20 Jan 2024 11:44:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705779887; cv=pass; d=google.com; s=arc-20160816; b=Sj6OhFpxES92xdOVJ81LgdmCjre8G3W3N1kZTl0ela+KvZpiJiVY4Udb8wQekf/zM7 anfWzbTUHXjlnNqAHRKbydcqqTwc4dLUTizC411Yr50lwp5v3RcmfWOsLvRzjQfEQOzk Z5vaooqItzQZIfxHhs5cC923DiOiuTv02rULL0oIIwDOBtkzCHU5rRLjNUtqR3yskS/Q 4YX6jg1gTBlw/FV8LCLFtJSyTG8E3QN/ic3Cgx7IA0mVZVxF7qd7QGslXMsJnrk4dhOH Vx0ex4A/iliKFNt8HjPK1Zgt14jJFsm/1hItWcEQHpcUUV1QaIeLfQjan/tmeSDd4KbV UcyA== 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=ywPil3sq+BXsI4q3/pQFvM4u5v0lrLzRi0/06kLn/i4=; fh=o3CEdS3yGN/eIa89Zn0Kf01WYLxTE9IjKuSQGVPeOHI=; b=vcL4KhkHTkHpuG5di2aJ/K+7YEJjC6ZizaXxNCfRsCp0QV1xWIdzF7RMJXWPSA4Rh5 6k4JJ9bfFWbQiivktSSa/AiN4WmG14Q2OULEATEnQHS0SzrV3GM673XglvFIV3UV3w+V 2s+E8AoA816gQZV4qiiwbMChgSW8yJtQ5tMTWMtzCFDUDBF6Ut8BIMA3VvXNyftHRzmK T8yXiD2IT1NUBbgPxwSHuzeztSZ6tsUsVPqkOV+ab9bTMHw4a/UNfqoEEuVQluYPNlIH aWY+9i1qpe1c1nHdTQYjOPR2pm8S53OmVJGK45YUamumsBZRZLoIH0v1oYVcy1pRgx3a 9sRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mWJgFiZW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b16-20020a0cb3d0000000b006819aeb2dd4si2226691qvf.365.2024.01.20.11.44.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 11:44:47 -0800 (PST) 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=@quicinc.com header.s=qcppdkim1 header.b=mWJgFiZW; 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=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 C31FD3858C50 for ; Sat, 20 Jan 2024 19:44:46 +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 3C14D3858C50 for ; Sat, 20 Jan 2024 19:44:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C14D3858C50 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 3C14D3858C50 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=1705779848; cv=none; b=J+OuPct10IzRcuKVrj+VTyQX4pKA6QonowOgI1YN9iE8yHOQr5wjARbcfAM5vBGGoFJWljIx0idzawOoGOHQRZX0ALqRaRuxOZc9Ps4w7PpBHYyrQBkABojzp3xWl1yv31rOhLzK02Uf7PizZzu9/1dFrnOthsvRLqIhnriDUsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705779848; c=relaxed/simple; bh=NgwJgJRQB9Gp/4R+MI5VzADm+nbTLukot/FTSm/jx9M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Q4SWp5YWiyOyM3sPvxrWvY3U4eni6PT4lZKXhnjQX+jKFce0YhQOuaWI8ZEqQa0yKqF/jPBP2rIAGZJSCXGi6nnzS3nGgyDHbNaDa4TVmkLmKtGPWnOX+3Jx/YHgByZ5WYxxjVJRjf5UrNBGTOL31J4nMTMD8N3DdIjAPNLlDd4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40KJZ2ln009892 for ; Sat, 20 Jan 2024 19:44:04 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=ywPil3s q+BXsI4q3/pQFvM4u5v0lrLzRi0/06kLn/i4=; b=mWJgFiZWGC+Qjpwv6nk5zQb VQyvcpRuyzZpsS7JlnRZ3iiqWqA6O5krDMgbjuojXz+L3beJmNFZVlFLVJZ+Qk52 OruY2P2NTe+6K1fPRdP3lDagKFhbAWodIPpToqXJGZzN9aANZlQUV54Jg6hgKiTZ qB4ZFgCKh2XaVN46aOVg9jhBgb5i/YA5HFiQZwWxv9sQqT4eK90pOwbuvcJXQvEA 4s/UiQQjewaA2LEyWYXX1uMZ1hfHsTfsVe/9iUqEoqJPkdvQv0+JG8sitciRZVOr DdJB1lJRmZNel8sN06PO5w81sQ0D6i4hcwyQNmusSivsRWV7Ok5ijXIot875NIA= = Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vr6xn0wtr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 20 Jan 2024 19:44:04 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40KJi4mF013157 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 20 Jan 2024 19:44:04 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; Sat, 20 Jan 2024 11:44:03 -0800 From: Andrew Pinski To: CC: Andrew Pinski Subject: [COMMITTED] ipa: Add testcase for already fixed case [PR110705] Date: Sat, 20 Jan 2024 11:43:45 -0800 Message-ID: <20240120194345.1996471-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: nalasex01b.na.qualcomm.com (10.47.209.197) 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-GUID: mkmjvNPQOAa3WM9dK4VV4thJ_H_PowFK X-Proofpoint-ORIG-GUID: mkmjvNPQOAa3WM9dK4VV4thJ_H_PowFK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-20_04,2024-01-19_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 mlxscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=794 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401200160 X-Spam-Status: No, score=-13.2 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: 1788639851231994104 X-GMAIL-MSGID: 1788639851231994104 This testcase was fixed with r13-1695-gb0f02eeb906b63 which added an Ada testcase for the issue but adding a C testcase is a good idea and that is what this does. Committed after making sure it passes on x86_64-linux-gnu. PR ipa/110705 gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr110705-1.c: New test. Signed-off-by: Andrew Pinski --- .../gcc.c-torture/compile/pr110705-1.c | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr110705-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c b/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c new file mode 100644 index 00000000000..6c0029c99e3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr110705-1.c @@ -0,0 +1,27 @@ +/* PR ipa/110705 */ + +/* We used to ICE in gimplify_modify_expr due to + the gimplifier not handling VCE between an struct + and an integer type. */ + +struct a { + long b; +}; +union d { + struct a b; + int e; +}v; +long c; +int f; +static void g(union d h, long i) { + while (1) + switch (c) + case 4: + if (h.e) + c = 4; +} +void j(union d *h) { + if (f) + g(*h, h->b.b); +} +void k() { union d *h = &v; j(h); }