Message ID | 87lgkrtced.fsf@linaro.org |
---|---|
State | New |
Headers | show |
Series | [committed] PR82413: Mismatched precisions in build_range_check | expand |
Index: gcc/fold-const.c =================================================================== --- gcc/fold-const.c 2017-10-04 11:43:11.653350269 +0100 +++ gcc/fold-const.c 2017-10-04 11:43:49.030813918 +0100 @@ -4851,7 +4851,7 @@ build_range_check (location_t loc, tree { int prec = TYPE_PRECISION (etype); - if (wi::mask (prec - 1, false, prec) == high) + if (wi::mask <widest_int> (prec - 1, false) == wi::to_widest (high)) { if (TYPE_UNSIGNED (etype)) { Index: gcc/testsuite/g++.dg/pr82413.C =================================================================== --- /dev/null 2017-10-04 10:21:58.939451407 +0100 +++ gcc/testsuite/g++.dg/pr82413.C 2017-10-04 11:43:49.030813918 +0100 @@ -0,0 +1,3 @@ +bool a; +int b; +void c() { b &&a <= 0; }