Re: [PATCH] Fix undefined behaviour in combine.c:force_to_mode

2012-07-06 Thread Eric Botcazou
> Note that most other places in force_to_mode optimizing shifts already > check for non-negative shift amounts; but in this place the check is > missing. > > The following patch adds the check here as well, fixing the undefined > behaviour (and subsequent bootstrap comparison failure) in my test.

[PATCH] Fix undefined behaviour in combine.c:force_to_mode

2012-07-06 Thread Ulrich Weigand
Hello, in testing a patch on arm-linux-gnueabihf, I ran into a bootstrap comparison failure that turned out to be caused by a pre-existing bug in common code, where combine.c code exposed undefined behaviour. The problem is this code in force_to_mode when simplifying a LSHIFTRT: /* Here we