[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc ICE when compiling 2.4 kernel



On Wed, Sep 03, 2003 at 11:22:20AM +0200, Geert Uytterhoeven wrote:
> On 3 Sep 2003, Goswin von Brederlow wrote:
> > I'm trying to build the Linux 2.4.22 kernel from the linux-m68k cvs:
> > 
> > :pserver:anon@linux-m68k-cvs.apia.dhs.org:/home/linux-m68k/cvsroot
> > Pass: anon
> > 
> > When compiling ide cdrom support the compiler ICEs:
> > 
> > make[3]: Entering directory `/mnt/linux-m68k-cvs/drivers/ide'
> > gcc -D__KERNEL__ -I/mnt/linux-m68k-cvs/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -fno-strength-reduce -ffixed-a2 -m68060 -DMODULE  -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_cd  -c -o ide-cd.o ide-cd.c
> > ide-cd.c: In function `ide_cdrom_dump_status':
> > ide-cd.c:619: internal compiler error: in verify_local_live_at_start, at flow.c:601
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> > make[3]: *** [ide-cd.o] Error 1
> > 
> > Its a debian sid binary-m68k from yesterday (20030902):
> > 
> > % gcc --version
> > gcc (GCC) 3.3.2 20030812 (Debian prerelease)
> > Copyright (C) 2003 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > 
> > 
> > Is this a known problem? Any workarounds known?
> 
> This is a known problem. Richard Zidlicky investigated it and filed a bug (cfr.
> his summary of gcc 3.x bugs posted on linux-m68k last week).
> 
> Workaround: disable optimization.

Another workaround: instead of "error.all" use a "char error" variable,
would it be acceptable to mangle our CVS tree as workaround for this bug?

Yet another workaround:

--- gcc-3.3.1/gcc/flow.c        2003-08-19 23:22:12.000000000 +0200
+++ gcc-3.3.1-rz/gcc/flow.c     2003-08-23 12:24:27.000000000 +0200
@@ -582,10 +582,12 @@
       /* Find the set of changed registers.  */
       XOR_REG_SET (new_live_at_start, bb->global_live_at_start);
 
+#define RZ_HACK 1
+
       EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i,
        {
          /* No registers should die.  */
-         if (REGNO_REG_SET_P (bb->global_live_at_start, i))
+         if ( !RZ_HACK && REGNO_REG_SET_P (bb->global_live_at_start, i))
            {
              if (rtl_dump_file)
                {
@@ -597,7 +599,7 @@
            }
 
          /* Verify that the now-live register is wider than word_mode.  */
-         verify_wide_reg (i, bb);
+         if (!RZ_HACK) verify_wide_reg (i, bb);
        });
     }
 }

The generated code will not be quite optimal but appears correct.

Richard



Reply to: