Message ID | 87a7q9ezlh.fsf@arm.com |
---|---|
State | New |
Headers | show |
Series | [committed] Resync inline implementation of ceil_log2 (PR 86506) | expand |
Index: gcc/hwint.h =================================================================== --- gcc/hwint.h 2018-05-02 08:38:14.433364094 +0100 +++ gcc/hwint.h 2018-07-30 12:21:39.204235940 +0100 @@ -242,7 +242,7 @@ floor_log2 (unsigned HOST_WIDE_INT x) static inline int ceil_log2 (unsigned HOST_WIDE_INT x) { - return floor_log2 (x - 1) + 1; + return x == 0 ? 0 : floor_log2 (x - 1) + 1; } static inline int