This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/22072] bizarre code for int*int/2
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jun 2005 21:18:04 -0000
- Subject: [Bug middle-end/22072] bizarre code for int*int/2
- References: <20050615060438.22072.felix-gcc@fefe.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-15 21:18 -------
(In reply to comment #6)
> SAR r/m32, 1 Signed divide* r/m32 by 2, once
Huh, I think that is wrong, witness:
#include <stdio.h>
int f(int a)
{
return a >> 1;
}
int main(void)
{
int g = f(-5);
printf("%d\n", g);
}
prints -3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22072