From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id CCE56385841A for ; Thu, 25 Aug 2022 10:53:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCE56385841A Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661424824; bh=e+9Sc3XV5mza+eh6u7iUSf6p3IORV+P7380SonFnDIQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Ri/WQwWoBYKLmxqz8Az4zuBP5mij/Ky8xW1BjQPlcfnmTsuM4O2CJpekO2jP1yEjE +vrVoEkJkA6PASYmV7+jbtGgGXgH6nnpoaH0V224JZcyK5P/Q7wDhqlc7EzPv86B64 +5kxTV/gMWmZ/28nLLgnRWWtftnYThnifpiJyfDI= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 4FE30667A6; Thu, 25 Aug 2022 06:53:43 -0400 (EDT) Message-ID: Subject: Re: [PATCH 1/2] LoongArch: Avoid RTL flag check failure in loongarch_classify_symbol From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org Cc: Chenghua Xu , Youling Tang , Huacai Chen , Jinyang He , Wang Xuerui Date: Thu, 25 Aug 2022 18:53:41 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD,KAM_STOCKGEN,LIKELY_SPAM_FROM,PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2022-08-25 at 16:29 +0800, Lulu Cheng wrote: >=20 > =E5=9C=A8 2022/8/24 =E4=B8=8B=E5=8D=8810:03, Xi Ruoyao =E5=86=99=E9=81=93= : > =C2=A0 > > SYMBOL_REF_TLS_MODEL invokes SYMBOL_REF_FLAGS, and SYMBOL_REF_FLAGS > > invokes RTL_FLAG_CHECK1 and aborts when RTL code is not SYMBOL_REF. > >=20 > > r13-1833 removed "gcc_assert (SYMBOL_REF_P (x))" before invoking > > "SYMBOL_REF_TLS_MODEL (x)", indicating that it's now possible that > > "x" > > is not a SYMBOL_REF. So we need to check if "x" is SYMBOL_REF > > first. > >=20 > > This fixes a test failure happening with r13-2173: > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0pr106096.C:26:1: internal compiler error: RTL f= lag check: > > =C2=A0=C2=A0=C2=A0=C2=A0SYMBOL_REF_FLAGS used with unexpected rtx code = 'const' in > > =C2=A0=C2=A0=C2=A0=C2=A0loongarch_classify_symbol >=20 > I think there is no problem with the code modification, but I have not > detected this ICE. If ENABLE_RTL_CHECKING is disabled (for example, use --enable- checking=3Drelease, which is also the default for release tarballs), the check will be skipped. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University