public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-3120] lto-streamer-in: Adjust assert [PR102989]
@ 2023-08-10 7:23 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-08-10 7:23 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d5ad55a83d504df582d1e6f1c168454a028c0437
commit r14-3120-gd5ad55a83d504df582d1e6f1c168454a028c0437
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Aug 10 09:23:08 2023 +0200
lto-streamer-in: Adjust assert [PR102989]
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-10 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.
Diff:
---
gcc/lto-streamer-in.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc
index 1876e1967ec0..0cce14414ca8 100644
--- a/gcc/lto-streamer-in.cc
+++ b/gcc/lto-streamer-in.cc
@@ -1888,7 +1888,7 @@ lto_input_tree_1 (class lto_input_block *ib, class data_in *data_in,
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-10 7:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 7:23 [gcc r14-3120] lto-streamer-in: Adjust assert [PR102989] Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).