Subject: bin/2680: gcc expr bug, fix known
To: None <gnats-bugs@NetBSD.ORG>
From: Peter Seebach <seebs@taniemarie.solon.com>
List: netbsd-bugs
Date: 08/09/1996 10:21:26
>Number: 2680
>Category: bin
>Synopsis: gcc optimizer bug
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 9 11:35:03 1996
>Last-Modified:
>Originator: Peter Seebach
>Organization:
Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
Unsolicited email is not welcome, and will be billed for at consulting rates.
The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
>Release: 1.2_BETA
>Environment:
System: NetBSD taniemarie 1.2_BETA NetBSD 1.2_BETA (SEEBS) #3: Wed Jul 24 00:10:48 CDT 1996 seebs@taniemarie:/usr/src/sys/arch/amiga/compile/SEEBS amiga
>Description:
gcc has an optimizer bug, involving static and readonly attributes.
>How-To-Repeat:
Read the X-Mosaic-Alpha list, where someone described it. Note that
the comment in the source contradicts the current source.
>Fix:
In expr.c, expand_expr(), around line 4582, change
RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) | TREE_STATIC (exp);
to
RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) & TREE_STATIC (exp);
...
>Audit-Trail:
>Unformatted: