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]

optimization/5422: powerpc -O2 -fssa -fdce misoptimization



>Number:         5422
>Category:       optimization
>Synopsis:       powerpc -O2 -fssa -fdce misoptimization
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 18 01:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     haruki.kodera@nifty.com
>Release:        3.0.3
>Organization:
>Environment:
Configured with: ./configure --target=ppc-eabi --enable-languages=c,c++ --disable-multilib
>Description:
gcc-3.0.3 miscompiles code with -O2 -fssa -fdce

The testcase:
------------ BEGIN -------------
volatile int check = 0;

extern void waitcheck ()
{
  while (!check) {}
}
-------------- END ----------------

Since volatilization specification of
the "check" is carried out, it is a meaningful code.
However, if optimization is applied, it will become
 the function ended immediately.
>How-To-Repeat:
compile with -O2 (or higher) and -fssa and -fdce options.

---
I am sorry that it is poor at English.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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