Bug 56903 - [4.8/4.9 Regression] gcc is 4.8.0 fails to compile netdev.c from the linux kernel [internal compiler error: Maximum number of LRA constraint passes is achieved]
Summary: [4.8/4.9 Regression] gcc is 4.8.0 fails to compile netdev.c from the linux ke...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 10:39 UTC by gdamjan
Modified: 2013-04-26 18:06 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.7.3
Known to fail: 4.8.0, 4.9.0
Last reconfirmed: 2013-04-10 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gdamjan 2013-04-10 10:39:33 UTC
I'm using 32bit ArchLinux (i686)
The gcc package version is 4.8.0-1

When compiling the latest Linux kernel 3.8.6 the compile fails with the following error. With the help of other Arch users we concluded that it's due to target processor beeing set to "Pentium M". It doesn't happen on 64bit Arch Linuxes.

The error:

  CC [M]  drivers/net/ethernet/intel/e1000e/netdev.o
drivers/net/ethernet/intel/e1000e/netdev.c: In function ‘e1000_xmit_frame’:
drivers/net/ethernet/intel/e1000e/netdev.c:5159:1: internal compiler error: Maximum number of LRA constraint passes is achieved (30)

 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make[5]: *** [drivers/net/ethernet/intel/e1000e/netdev.o] Error 1
make[4]: *** [drivers/net/ethernet/intel/e1000e] Error 2
Comment 1 Jakub Jelinek 2013-04-10 11:47:26 UTC
Please provide info requested in http://gcc.gnu.org/bugs.html
Comment 2 Markus Trippelsdorf 2013-04-10 11:49:35 UTC
Reduced:

markus@x4 linux % cat test.i
extern int fn3(),fn4();
struct
{
    int data_len;
}
*b;
struct tcphdr
{
    int doff:1;
};
int a, c;
struct tcphdr *fn1 ();
void fn2 ()
{
    int d, e = fn3 ();
    char f;
    d = fn1 ()->doff * 4;
    f = c + d;
    if (b->data_len && f == e)
        a = (
        {
            b->data_len;
        }
    );
    fn4 (b);
}
markus@x4 linux % gcc -Os -m32 -mtune=pentium3 -c test.i
test.i: In function ‘fn2’:
test.i:26:1: internal compiler error: Maximum number of LRA constraint passes is achieved (30)
Comment 3 Marek Polacek 2013-04-10 11:53:03 UTC
Confirmed with testcase by Markus.  LRA, thus adding Vlad.
Comment 4 Jakub Jelinek 2013-04-10 12:02:27 UTC
Slightly cleaned up testcase:
/* PR rtl-optimization/56903 */
/* { dg-do compile } */
/* { dg-options "-Os" } */
/* { dg-additional-options "-march=pentium3" { target ia32 } } */

int a, *b, c;
struct S { int s : 1; } *fn1 (void);
extern int fn3 (void), fn4 (int *);

void
fn2 (void)
{
  int e = fn3 ();
  char f = c + fn1 ()->s * 4;
  if (*b && f == e)
    a = *b;
  fn4 (b);
}
Comment 5 Jakub Jelinek 2013-04-26 18:06:28 UTC
Author: vmakarov
Date: Fri Apr 12 17:09:10 2013
New Revision: 197927

URL: http://gcc.gnu.org/viewcvs?rev=197927&root=gcc&view=rev
Log:
2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/56903
	* config/i386/i386.c (ix86_hard_regno_mode_ok): Add
	lra_in_progress for return.

2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/56903
	* gcc.target/i386/pr56903.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr56903.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog

Author: vmakarov
Date: Fri Apr 12 17:13:45 2013
New Revision: 197928

URL: http://gcc.gnu.org/viewcvs?rev=197928&root=gcc&view=rev
Log:
2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/56903
	* config/i386/i386.c (ix86_hard_regno_mode_ok): Add
	lra_in_progress for return.

2013-04-12  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/56903
	* gcc.target/i386/pr56903.c: New test.


Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr56903.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/i386/i386.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog