rajeevc@oriley.intel.com (09/28/89)
--bug001
/*
no casting done in explicit casting expression
prints : d=f2db93e d=f2db93e
should print : d=f2db93e d=3e
*/
int c;
int d;
main()
{
c = (unsigned char) (d = 0xf2db93e);
printf("\
d=%x\n\
c=%x\n\
",
d, c);
}
.file "bug001.c"
.version "GNU C 1.36"
.optim
gcc_compiled.:
.text
.align 4
.LC0:
.byte 0x9,0x9,0x9,0x64,0x3d,0x25,0x78,0xa,0x9,0x9
.byte 0x9,0x63,0x3d,0x25,0x78,0xa,0x9,0x9,0x9,0x0
.align 4
.globl main
main:
movl $254654782,d
movl $254654782,c / this is wrong
pushl $254654782
pushl $254654782
pushl $.LC0
call printf
addl $12,%esp
ret
.comm d,4
.comm c,4