public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989]
@ 2023-08-09 18:15 Jakub Jelinek
  2023-08-10  7:19 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2023-08-09 18:15 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

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.

--- 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989]
  2023-08-09 18:15 [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989] Jakub Jelinek
@ 2023-08-10  7:19 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-08-10  7:19 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-10  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 18:15 [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989] Jakub Jelinek
2023-08-10  7:19 ` Richard Biener

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).