https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63904

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> ---
It seems to be related to constexpr.c:cxx_eval_vec_init_1 function.  The line '
int max = tree_to_shwi (array_type_nelts (atype));' there should be changed
into 'int max = (int) tree_to_uhwi (array_type_nelts (atype));'.

Issue is that array_type_netls returns size_type node (which is unsigned) with
UHWI_MAX as value.  Means that on conversions the value won't fit into shwi. 
By reading value as unsigned and then later on casting it to signed (btw
shouldn't we use here instead HOST_WIDE_INT?), we solve this issue.

Reply via email to