On Wed, Nov 23, 2016 at 10:59 AM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> this is an ICE present on the mainline and 6 branch, a regression introduced
> by r241529 which added the consistency check for boolean values.  So it turns
> out that Ada is not the only producer of non-standard boolean types, there is
> even a helper function to do it in tree.c (build_nonstandard_boolean_type) and
> it builds even weirder boolean types than Ada since they are signed.
>
> The problem is that -1 is not considered as a valid value for them any more
> and this confuses VRP.  Therefore the attached patch adjusts the consistency
> check to accept -1 instead of +1 for them.
>
> Tested on x86_64-suse-linux, OK for the mainline and 6 branch?

Ok.

Thanks,
Richard.

>
> 2016-11-23  Eric Botcazou  <ebotca...@adacore.com>
>
>         PR middle-end/78429
>         * tree.h (wi::fits_to_boolean_p): New predicate.
>         (wi::fits_to_tree_p): Use it for boolean types.
>         * tree.c (int_fits_type_p): Likewise.
>
>
> 2016-11-23  Eric Botcazou  <ebotca...@adacore.com>
>
>         * gcc.c-torture/compile/20161123-1.c: New test.
>
> --
> Eric Botcazou

Reply via email to