Bug 490513 - -O1 loop optimization bug
Summary: -O1 loop optimization bug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-16 19:07 UTC by Paolo Carlini
Modified: 2009-09-02 11:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:43:46 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1376 0 normal SHIPPED_LIVE gcc bug fix update 2009-09-01 11:41:20 UTC

Description Paolo Carlini 2009-03-16 19:07:50 UTC
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 19:08:44 UTC
Created attachment 335399 [details]
gcc41 fix

Comment 8 errata-xmlrpc 2009-09-02 11:43:46 UTC
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.