This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/7632: gcc 3.2 for PowerPC: instruction scheduling ignores dependency in variable asignments
- From: Horst dot Lehser at hightec-rt dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 19 Aug 2002 11:49:16 -0000
- Subject: optimization/7632: gcc 3.2 for PowerPC: instruction scheduling ignores dependency in variable asignments
- Reply-to: Horst dot Lehser at hightec-rt dot com
>Number: 7632
>Category: optimization
>Synopsis: gcc 3.2 for PowerPC: instruction scheduling ignores dependency in variable asignments
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 19 04:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Horst Lehser
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
the following C source will generate incorrect code
double a;
double foo(void)
{
((int *)&a)[1] += 5;
return;
}
Generated assembler
foo:
lis %r3,a+4@ha
lis %r5,a@ha
lwz %r4,a+4@l(%r3)
lfd %f1,a@l(%r5) /* a not modified yet */
addi %r0,%r4,10
stw %r0,a+4@l(%r3)
blr
>How-To-Repeat:
compile the following code with
gcc -O3 -S
double a;
double foo(void)
{
((int *)&a)[1] += 10;
return a;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: