This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19293] avr-gcc crashes when using shifts with negative shift count
- From: "bjoern dot m dot haase at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2005 23:28:01 -0000
- Subject: [Bug target/19293] avr-gcc crashes when using shifts with negative shift count
- References: <20050106160127.19293.bjoern.m.haase@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bjoern dot m dot haase at web dot de 2005-01-18 23:27 -------
Hi,
I have just stepped over a patch suggested by Bernardo Innocenti in order to
treat the case of "shift_count == 0" correctly. My presently suggested
patch (above) only treats the case of negative shift counts.
I did not realize that the case of "0" also is buggy.
So for treating the shifting problem comprehensively, one should combine both.
This could be done by replacing the checks for "< 0" in my patch by checks
for "<= 0".
Yours,
Björn
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19293