Bug 490513 - -O1 loop optimization bug
-O1 loop optimization bug
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
5.3
All Linux
low Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-16 15:07 EDT by Paolo Carlini
Modified: 2009-09-02 07:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:43:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
gcc41 fix (10.56 KB, patch)
2009-03-16 15:08 EDT, Paolo Carlini
no flags Details | Diff

  None (edit)
Description Paolo Carlini 2009-03-16 15:07:50 EDT
This testcase ICEs GCC at -O1, on x86_64:

void foo ()
  {
    short x, y, z;
    char a[3];

    for (x = 0; x < 2; x++)
      for (y = 0; y < 2; y++)
	if (a[y])
	  {
	    for (z = y - 1; z > -1; z--)
	      a[z]++;
	  }
  }

I'm also attaching a patch fixing the problem and successfully regtested.
Comment 1 Paolo Carlini 2009-03-16 15:08:44 EDT
Created attachment 335399 [details]
gcc41 fix
Comment 8 errata-xmlrpc 2009-09-02 07:43:46 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1376.html

Note You need to log in before you can comment on or make changes to this bug.