On 11/20/2014 02:48 PM, Kai Tietz wrote:
this issue fixes a type-overflow issue caused by trying to cast a UHWI via tree_to_shwi. As soon as value gets larger then SHWI_MAX, we get an error for it. So we need to cast it via tree_to_uhwi, and then casting it to the signed variant.
The problem seems to be with zero-length arrays getting -1 from array_type_nelts. Let's use array_type_nelts_top instead so we don't ever see negative values.
Jason