Article View: gnu.gcc.bug
Article #651bug002
From: rajeevc
Date: Wed, 27 Sep 1989 22:03
Date: Wed, 27 Sep 1989 22:03
48 lines
1262 bytes
1262 bytes
---bug002----
/*
multiple assignments between different types
i receives l's value instead of b's value
maybe the same bug as #1 (implicit casting).
*/
unsigned long l;
unsigned char b;
int i;
main()
{
i = (b = (l = 0xaf2db93e));
printf("\
l=%x\n\
b=%x\n\
i=%x\n\
",
l, b, i);
}
.file "bug002.c"
.version "GNU C 1.36"
.optim
gcc_compiled.:
.text
.LC0:
.byte 0x9,0x9,0x9,0x6c,0x3d,0x25,0x78,0xa,0x9,0x9
.byte 0x9,0x62,0x3d,0x25,0x78,0xa,0x9,0x9,0x9,0x69
.byte 0x3d,0x25,0x78,0xa,0x9,0x9,0x9,0x0
.align 4
.globl main
main:
movl $-1355957954,l
movb $-1355957954,b / movl $62,b
movl $-1355957954,i / movl $62,i
pushl $-1355957954 / pushl $62
movzbl b,%eax
pushl %eax / pushl $62
pushl $-1355957954
pushl $.LC0
call printf
addl $16,%esp
ret
.comm i,4
.comm b,1
.comm l,4
Technical Details
Message-ID:
<8909272203.AA02126@oriley>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!oriley.intel.com!rajeevcShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!oriley.intel.com!rajeevc From: rajeevc@oriley.intel.com Newsgroups: gnu.gcc.bug Subject: bug002 Message-ID: <8909272203.AA02126@oriley> Date: 27 Sep 89 22:03:23 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 48