[Bug c/54027] possible mis-optimization of signed left shift in c89 mode

2012-07-19 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54027 --- Comment #2 from joseph at codesourcery dot com 2012-07-19 15:07:54 UTC --- On Thu, 19 Jul 2012, rguenth at gcc dot gnu.org wrote: > Isn't it invoking undefined behavior by means of a signed integer overflow? > (if shifts are not defined in te

[Bug c/54027] possible mis-optimization of signed left shift in c89 mode

2012-07-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54027 --- Comment #1 from Richard Guenther 2012-07-19 10:07:11 UTC --- Isn't it invoking undefined behavior by means of a signed integer overflow? (if shifts are not defined in terms of multiplies we may not internally fold x << 1 to x * 2).