This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54027

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]