This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/2480: aliasing problem with global structures


Synopsis: aliasing problem with global structures

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Mar  7 02:19:07 2003
State-Changed-Why:
    Indeed. This odd behavior persists in 3.2, 3.3 and present
    mainline. Annoying. As noted, this is even better visible
    in x86 assembler:
    
    bar:
    	pushl %ebp
    	movl %esp,%ebp
    	movl ex1,%eax
    	movb $1,(%eax)
    	movl ex1,%eax    <-- this is the duplicate reload
    	movl $2,4(%eax)
    	movb $3,8(%eax)
    	movl %ebp,%esp
    	popl %ebp
    	ret
    
    foo:
    	pushl %ebp
    	movl %esp,%ebp
    	movl 8(%ebp),%eax
    	movb $1,(%eax)
    	movl $2,4(%eax)
    	movb $3,8(%eax)
    	movl %ebp,%esp
    	popl %ebp
    	ret
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2480


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]