Bug 223576

Summary: internal compiler error: in copy_to_mode_reg, at explow.c:577
Product: Red Hat Enterprise Linux 4 Reporter: Sorav Bansal <bsorav>
Component: gcc4Assignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: aoliva
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:27:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Preprocessed source emitted by gcc none

Description Sorav Bansal 2007-01-20 02:38:33 UTC
Description of problem: internal compiler error: in copy_to_mode_reg, at
explow.c:577


Version-Release number of selected component (if applicable): 4.1.1 20070105


How reproducible:
Preprocessed source attached.

Steps to Reproduce:
1.Compile the preprocessed source
2.
3.
  
Actual results:
/export/u1/sbansal/SO/generator/i386.C: In member function âbool
instruction_386::is_logical_opcode(opcode_t)â:
/export/u1/sbansal/SO/generator/i386.C:5475: internal compiler error: in
copy_to_mode_reg, at explow.c:577


Expected results:
Should have compiled fine (compiles okay with older versions of gcc)


Additional info:

Comment 1 Sorav Bansal 2007-01-20 02:38:34 UTC
Created attachment 146052 [details]
Preprocessed source emitted by gcc

Comment 2 Jakub Jelinek 2007-01-20 19:30:26 UTC
Simplified testcase:
struct A
{
  int a:16;
  int b:8;
  bool operator==(A const x) const
  {
    return (this->a == x.a && this->b == x.b);
  }
};
const A c[] =
{
  {0x08, (0x3<<5)}, {0x09, (0x3<<5)},
  {0x0a, (0x3<<5)}, {0x0b, (0x3<<5)}
};
const int d = sizeof (c) / sizeof (A);

bool
foo (A const x)
{
  for (int i = 0; i < d; i++)
    if (c[i] == x)
      return true;
  return false;
}

Fails even with current FC6/RHEL5 4.1.1-RH GCC, doesn't fail with GCC trunk.

Comment 3 Alexandre Oliva 2007-02-13 01:57:35 UTC
Patch posted at http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01126.html

Comment 4 Jiri Pallich 2012-06-20 13:27:35 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.