From patchwork Mon Nov 29 21:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 48266 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 81BB73858012 for ; Mon, 29 Nov 2021 21:57:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81BB73858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1638223061; bh=0UNtvJOEkBhI6Dt8meHsXAssOYdsdcgaDNONfuIymWo=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LaYid1piTVjyenvyKqVjzzNUs6qNThmRAQswfiM8WKINffESRHU2k+yX7+xjpWbyH NUtcRhsy5CXcMQPjewjQQwsQSEDLJ6U3GYmF6Fn53+ZTGVv5RM7oem9ZFe82Swhxve WWeXmF2GeFetQ3BGP51fjt4Pqh00i+ipXrnGT1jA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id E9EAE385841C for ; Mon, 29 Nov 2021 21:57:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E9EAE385841C Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ATLGF66019726; Mon, 29 Nov 2021 21:57:11 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cn6mq8s7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Nov 2021 21:57:10 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1ATLlUk7016093; Mon, 29 Nov 2021 21:57:09 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma04wdc.us.ibm.com with ESMTP id 3ckcaaw9ru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Nov 2021 21:57:09 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1ATLv9Pb31195518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Nov 2021 21:57:09 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBD961240A9; Mon, 29 Nov 2021 21:57:06 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64AE112409A; Mon, 29 Nov 2021 21:57:06 +0000 (GMT) Received: from [9.160.47.23] (unknown [9.160.47.23]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 29 Nov 2021 21:57:06 +0000 (GMT) Message-ID: Date: Mon, 29 Nov 2021 15:56:58 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Content-Language: en-US To: GCC Patches Subject: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127] X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4Ju_uvagqum26VAl_vk-N9hHc71WXpBL X-Proofpoint-ORIG-GUID: 4Ju_uvagqum26VAl_vk-N9hHc71WXpBL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-29_11,2021-11-28_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 clxscore=1011 suspectscore=0 bulkscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111290100 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Peter Bergner via Gcc-patches From: Peter Bergner Reply-To: Peter Bergner Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Sorry for dropping the ball on testing the patch from the bugzilla! The following patch fixes the ICE reported in the bugzilla on the pre-existing gcc testsuite test case, bootstraps and shows no testsuite regressions on powerpc64le-linux. Ok for trunk? Peter For -ftrivial-auto-var-init=*, skip initializing the register variable if it is an opaque type, because CONST0_RTX(mode) is not defined for opaque modes. gcc/ PR middle-end/103127 * internal-fn.c (expand_DEFERRED_INIT): Skip if VAR_TYPE is opaque. diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 0cba95411a6..7cc0e9d5293 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -3070,6 +3070,10 @@ expand_DEFERRED_INIT (internal_fn, gcall *stmt) } else { + /* Skip variables of opaque types that are in a register. */ + if (OPAQUE_TYPE_P (var_type)) + return; + /* If this variable is in a register use expand_assignment. For boolean scalars force zero-init. */ tree init;