This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
internal compiler error: in simplify_subreg, at simplify-rtx.c:5138
- From: Wu Zhangjin <wuzhangjin at gmail dot com>
- To: gcc at gnu dot org
- Date: Tue, 24 Nov 2009 01:10:36 +0800
- Subject: internal compiler error: in simplify_subreg, at simplify-rtx.c:5138
- Reply-to: wuzhangjin at gmail dot com
Hi,
I'm using the latest gcc 4.5 to compile the latest linux kernel(rc8).
$ mips64el-unknown-linux-gnu-gcc --version
mips64el-unknown-linux-gnu-gcc (GCC) 4.5.0 20091123 (experimental)
and encountered this error:
$ make ARCH=mips CROSS_COMPILE=mips64el-unknown-linux-gnu- mm/rmap.o
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-mips
Checking missing-syscalls for N32
CALL scripts/checksyscalls.sh
Checking missing-syscalls for O32
CALL scripts/checksyscalls.sh
CALL scripts/checksyscalls.sh
CC mm/rmap.o
mm/rmap.c: In function 'try_to_unmap_one':
mm/rmap.c:860:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5138
Please submit a full bug report,
I have tried to find the exact place which introduced this error and at
last found out this line of that file:
818 swp_entry_t entry = { .val = page_private(page) };
If I change that line to:
swp_entry_t entry = { .val = 1 };
the error will go away.
and I found that page_privete(page) is something like this:
include/linux/mm.h:
228 #define page_private(page) ((page)->private)
So, I moved that (page)->private to the above directly, and try it with:
swp_entry_t entry = { .val = ((page)->private) };
and
swp_entry_t entry = { .val = (page)->private };
and
swp_entry_t entry = { .val = page->private };
and even tried with:
swp_entry_t entry;
entry.val = page->private;
All of them failed, at last, I found the line of gcc:
5130 /* Simplify SUBREG:OUTERMODE(OP:INNERMODE, BYTE)
5131 Return 0 if no simplifications are possible. */
5132 rtx
5133 simplify_subreg (enum machine_mode outermode, rtx op,
5134 enum machine_mode innermode, unsigned int byte)
5135 {
5136 /* Little bit of sanity checking. */
5137 gcc_assert (innermode != VOIDmode);
5138 gcc_assert (outermode != VOIDmode); --> This line.....
5139 gcc_assert (innermode != BLKmode);
5140 gcc_assert (outermode != BLKmode);
any more information needed for the above problem?
Best Regards,
Wu Zhangjin