[Bug c/35039] New: ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-compile with gcc-4.0.0

2008-01-31 Thread yur at emcraft dot com
Hello,

 I'd like to report that there is the ICE happened when the linux-2.6.23 NFS
code is compiled using gcc-4.0.0:

CC fs/nfs/nfs4proc.o
fs/nfs/nfs4proc.c: In function 'nfs4_proc_readdir':
fs/nfs/nfs4proc.c:2237: error: unrecognizable insn:
(insn:HI 205 202 207 12 (set (reg:SI 126 [ D.22481 ])
(mem/s/f/j:SI (subreg:SI (reg:DI 190) 4) [0 .vm_mm+0
S4 A32])) -1 (nil)
(expr_list:REG_EQUAL (mem/s/j:SI (const_int 0 [0x0]) [0
.vm_mm+0 S4 A32])
(nil)))
fs/nfs/nfs4proc.c:2237: internal compiler error: in extract_insn, at 
recog.c:2020
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.

 Some observations: 

(a) if I make the _nfs4_proc_readdir() function (or the nfs4_setup_readdir()
one which is called from it) in fs/nfs/nfs4proc.c as "noinline" then gcc-4.0.0
compiles the nfs4proc.c file without problems;

(b) there are no problems for gcc-4.0.0 to compile fs/nfs/nfs4proc.c from the
2.6.24 kernel (some changes were made to this file since 2.6.23, but these are
not concerned to the function which produces the ICE);

(c) gcc-4.2.2 successfully compiles the 2.6.23 kernel, i.e. there's no this ICE
happened with this compiler.

 I guess, the problem is concerned with the following RTX:

 mem/s/f/j:SI (subreg:SI (reg:DI 190) 4)

 I've dumped the results of compiler's RTL passes for all the kernel files
(including fs/nfs/nfs4proc.c) in the cases of  using both gcc-4.0.0  and
gcc-4.2.2, and found that:

- gcc-4.0.0 produces similar RTXs in the nfs4proc.c case only;

- gcc-4.2.2 never produces similar RTXs through all the Linux kernel files (in
the RTX, which produces the error, the gcc-4.2.2 compiler keeps the expression
"reg:SI XXX" instead of "subreg:SI (reg:DI YYY) 4" through all the RTL
iterations).

 The Linux kernel I compiled is the "DENX-v2.6.23-stable" branch of the
git://www.denx.de/git/linux-2.6-denx.git tree. The gcc-4.0.0 compiler is the
part of ELDK 4.1. The target system is stx_gp3ssa.

# git-checkout DENX-v2.6.23-stable
# make ARCH=ppc CROSS_COMPILE=ppc_85xx- stx_gp3ssa_defconfig
# make ARCH=ppc CROSS_COMPILE=ppc_85xx- uImage

 Regards, Yuri

-- 
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com


-- 
   Summary: ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-
compile with gcc-4.0.0
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yur at emcraft dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: ppc_85xx-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35039



[Bug c/35039] ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-compile with gcc-4.0.0

2008-01-31 Thread yur at emcraft dot com


--- Comment #1 from yur at emcraft dot com  2008-01-31 09:59 ---
Created an attachment (id=15060)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15060&action=view)
This is the file, which produces the ICE described


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35039



[Bug c/35039] ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-compile with gcc-4.0.0

2008-01-31 Thread yur at emcraft dot com


--- Comment #2 from yur at emcraft dot com  2008-01-31 10:00 ---
Created an attachment (id=15061)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15061&action=view)
This is the dump of GCC-4.0.0 iterations when compiles the file which produce
the ICE


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35039



[Bug c/35039] ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-compile with gcc-4.0.0

2008-01-31 Thread yur at emcraft dot com


--- Comment #4 from yur at emcraft dot com  2008-01-31 10:54 ---
Richard,

The gcc 4.2.2 successfully compiles this code without ICEs (see the item (c) in
my description of the ICE). As far as the preprocessed source of nfs4proc.c is
concerned, here it is...

Regards, Yuri


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35039



[Bug c/35039] ICE in Linux-2.6.23 (fs/nfs/nfs4proc.c) when cross-compile with gcc-4.0.0

2008-01-31 Thread yur at emcraft dot com


--- Comment #5 from yur at emcraft dot com  2008-01-31 10:55 ---
Created an attachment (id=15063)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15063&action=view)
The preprocessed source of file which produces the ICE


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35039