Article View: gnu.gcc.bug
Article #652bug003
From: rajeevc
Date: Wed, 27 Sep 1989 22:13
Date: Wed, 27 Sep 1989 22:13
40 lines
953 bytes
953 bytes
/*
multiple inc/dec exprs (in one expr ) to same var return the same value
i==2 OK
j==0 should be 1
*/
int i,j;
main()
{
i = 0;
j = i++ + i++;
printf("i=%d\nj=%d\n",i,j);
}
.file "bug003.c"
.version "GNU C 1.36"
.optim
gcc_compiled.:
.text
.LC0:
.byte 0x69,0x3d,0x25,0x64,0xa,0x6a,0x3d,0x25,0x64,0xa
.byte 0x0
.align 4
.globl main
main:
movl $0,i
movl i,%eax
addl %eax,%eax
movl %eax,j
incl i
incl i
pushl %eax
pushl i
pushl $.LC0
call printf
addl $12,%esp
ret
.comm j,4
.comm i,4
Technical Details
Message-ID:
<8909272213.AA02132@oriley>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!gem.mps.ohio-state.edu!pacific.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!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!oriley.intel.com!rajeevc From: rajeevc@oriley.intel.com Newsgroups: gnu.gcc.bug Subject: bug003 Message-ID: <8909272213.AA02132@oriley> Date: 27 Sep 89 22:13:16 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 40