Message ID | ZNPX2msMcQsvxzgO@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2988347vqr; Wed, 9 Aug 2023 11:16:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4nRr0ZA0wdWOkAdIxVYWdIwVBNK3RcfIsF1NoCls3sbyU5g+DSF5ZspLMGqjRyEo4lv3N X-Received: by 2002:a05:6512:39c8:b0:4f9:72a5:2b76 with SMTP id k8-20020a05651239c800b004f972a52b76mr2723166lfu.65.1691605017856; Wed, 09 Aug 2023 11:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605017; cv=none; d=google.com; s=arc-20160816; b=tcJ0ZqSasM4EuBRTJ9SpDly4OR5MPbN+EjS2aCAMaTdwFflQlSCBKusgQZ69Fz7JQ0 tUsAkHM24jD34n+MkK3s0sLoXeUDAODu7K37YHcnJBEogA/uHYpZfnCScCbcp2hZRqBe XugysHgU+DnCk9ZDozwb7u8yHrn6PyX/fdrcahQAcE+OgMfTd6ndtPpzXOn0Tu2rCYFO iLrlG2bcgw7WdwhX45DGZbbxyVj3S+Ki9HDflrSSjaoXz/C2rYxIHC4EU8BxieIVSdB7 N3376adoIo6U5pWOorVSBuhD/dcngr6aJvcprcwq8KbJF4PhJn/Y9avxbzjxgKCYdxgr 7DRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ahqCpksk36nj2esESxkxczPeBCq/ciiNByPvgeyXDec=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=j0KLPDnwbDQr7QneXwZiR9NZ6Ffl2LFkt0Xx8LWMj739OFcsTjtnR3uAkgUJhnrBoG r/uYIF2Elf4hjKzXha1O/nCmAB7LV/G853fi2MInfaP9E6KgOMNmspk13A+n4ep11QqA UcQohNRhzUSK6vkA81tQf2Vb8Wa8XG9VOIDdfqHAMeP41RxjD1UHvinhNU+XdLrfJB6E v7zni+gUtejkb6uCHs7M5psDWnACLtu3HhgMe/up3EFWoWlU41jKbfrGhdMSvJMUAbe0 T4Qh+EoAx9g2zqmew45lKUup6++uigmqKmcOe20+bHuDyokYKb5AWfYcXEZwyLpkIjlh fN+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NlRCk2ts; 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=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w2-20020a50fa82000000b005234011bb47si3993802edr.679.2023.08.09.11.16.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:16:57 -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=@gcc.gnu.org header.s=default header.b=NlRCk2ts; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8151D3857C66 for <ouuuleilei@gmail.com>; Wed, 9 Aug 2023 18:16:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8151D3857C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605016; bh=ahqCpksk36nj2esESxkxczPeBCq/ciiNByPvgeyXDec=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=NlRCk2ts0/k9SoOu19YrH7IIWb6APvleQuSv9HfQOdFgRPW2BVPNfKKBXI0KxVF6J dHklqcMUHH5vUF9x72WZZkbMLMJVn/EDk8xttFl+452BULEWncOv6caJzG0F+gOm0K CpUHA5S0hSQs7SG6MZI6WSl+sdgsjt1siUCpi2dw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 48F953857B93 for <gcc-patches@gcc.gnu.org>; Wed, 9 Aug 2023 18:16:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48F953857B93 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-120-Pny1W8j-MliR49VHkpAVkQ-1; Wed, 09 Aug 2023 14:16:00 -0400 X-MC-Unique: Pny1W8j-MliR49VHkpAVkQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70E5C85CBFF; Wed, 9 Aug 2023 18:15:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 316F740C2076; Wed, 9 Aug 2023 18:15:58 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IFtAo2042880 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:15:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IFtHq2042879; Wed, 9 Aug 2023 20:15:55 +0200 Date: Wed, 9 Aug 2023 20:15:54 +0200 To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989] Message-ID: <ZNPX2msMcQsvxzgO@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776423096423982 X-GMAIL-MSGID: 1773776423096423982 |
Series |
GCC _BitInt support [PR102989]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Aug. 9, 2023, 6:15 p.m. UTC
Hi! With _BitInt(575) or any other _BitInt(513) or larger constants we can run into this assertion. MAX_BITSIZE_MODE_ANY_INT is just a value from which WIDE_INT_MAX_PRECISION is derived. 2023-08-09 Jakub Jelinek <jakub@redhat.com> PR c/102989 * lto-streamer-in.cc (lto_input_tree_1): Assert TYPE_PRECISION is up to WIDE_INT_MAX_PRECISION rather than MAX_BITSIZE_MODE_ANY_INT. Jakub
Comments
On Wed, 9 Aug 2023, Jakub Jelinek wrote: > Hi! > > With _BitInt(575) or any other _BitInt(513) or larger constants we can > run into this assertion. MAX_BITSIZE_MODE_ANY_INT is just a value from > which WIDE_INT_MAX_PRECISION is derived. OK. Richard. > 2023-08-09 Jakub Jelinek <jakub@redhat.com> > > PR c/102989 > * lto-streamer-in.cc (lto_input_tree_1): Assert TYPE_PRECISION > is up to WIDE_INT_MAX_PRECISION rather than MAX_BITSIZE_MODE_ANY_INT. > > --- gcc/lto-streamer-in.cc.jj 2023-07-17 09:07:42.078283882 +0200 > +++ gcc/lto-streamer-in.cc 2023-07-27 15:03:24.255234159 +0200 > @@ -1888,7 +1888,7 @@ lto_input_tree_1 (class lto_input_block > > for (i = 0; i < len; i++) > a[i] = streamer_read_hwi (ib); > - gcc_assert (TYPE_PRECISION (type) <= MAX_BITSIZE_MODE_ANY_INT); > + gcc_assert (TYPE_PRECISION (type) <= WIDE_INT_MAX_PRECISION); > result = wide_int_to_tree (type, wide_int::from_array > (a, len, TYPE_PRECISION (type))); > streamer_tree_cache_append (data_in->reader_cache, result, hash); > > Jakub >
--- gcc/lto-streamer-in.cc.jj 2023-07-17 09:07:42.078283882 +0200 +++ gcc/lto-streamer-in.cc 2023-07-27 15:03:24.255234159 +0200 @@ -1888,7 +1888,7 @@ lto_input_tree_1 (class lto_input_block for (i = 0; i < len; i++) a[i] = streamer_read_hwi (ib); - gcc_assert (TYPE_PRECISION (type) <= MAX_BITSIZE_MODE_ANY_INT); + gcc_assert (TYPE_PRECISION (type) <= WIDE_INT_MAX_PRECISION); result = wide_int_to_tree (type, wide_int::from_array (a, len, TYPE_PRECISION (type))); streamer_tree_cache_append (data_in->reader_cache, result, hash);