Bug 490513 - -O1 loop optimization bug
-O1 loop optimization bug
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  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:
Last Closed: 2009-09-02 07:43:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1376 normal SHIPPED_LIVE gcc bug fix update 2009-09-01 07:41:20 EDT

  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--)

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.


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