Bug 223576 - internal compiler error: in copy_to_mode_reg, at explow.c:577
internal compiler error: in copy_to_mode_reg, at explow.c:577
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc4 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2007-01-19 21:38 EST by Sorav Bansal
Modified: 2012-06-20 09:27 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 09:27:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Preprocessed source emitted by gcc (1.12 MB, application/octet-stream)
2007-01-19 21:38 EST, Sorav Bansal
no flags Details

  None (edit)
Description Sorav Bansal 2007-01-19 21:38:33 EST
Description of problem: internal compiler error: in copy_to_mode_reg, at

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
Actual results:
/export/u1/sbansal/SO/generator/i386.C: In member function âbool
/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-19 21:38:34 EST
Created attachment 146052 [details]
Preprocessed source emitted by gcc
Comment 2 Jakub Jelinek 2007-01-20 14:30:26 EST
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);

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-12 20:57:35 EST
Patch posted at http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01126.html
Comment 4 Jiri Pallich 2012-06-20 09:27:35 EDT
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.

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