This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/8315: Bad reordering in -O3
- From: bangerth at dealii dot org
- To: Gyro at reasoning dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 11 Dec 2002 21:25:41 -0000
- Subject: Re: optimization/8315: Bad reordering in -O3
- Reply-to: bangerth at dealii dot org, Gyro at reasoning dot com, 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: Bad reordering in -O3
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Dec 11 13:25:40 2002
State-Changed-Why:
You are violating aliasing rules here:
(*((void **) (&real_morecore)) = ((void *) (__morecore)));
(*((void **) (&__morecore)) = ((void *) (r_alloc_sbrk)));
If you remove the casts, the assembler code is ok.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8315