This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/2480: aliasing problem with global structures
- From: bangerth at dealii dot org
- To: dann at godzilla dot ics dot uci dot edu, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 7 Mar 2003 02:19:07 -0000
- Subject: Re: c/2480: aliasing problem with global structures
- Reply-to: bangerth at dealii dot org, dann at godzilla dot ics dot uci dot edu, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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