ass ‘CREG’
X-Bugzilla-Reason: CC
compiling testcase:
=== Cut ===
struct nand_chip {
· int · · page_shift;
· int· · phys_erase_shift;
};
extern void foo( int );
static void nand_writev_ecc (int *mtd, int *vecs, unsigned long count)
{
· int i, total_len;
· struct nand_chip *this;
· int· ppblock = (1 << (this->phys_erase_shift - this->page_shift));
· total_len = count;
· for (i = 0; i < count; i++)
· · total_len+=ppblock;
foo (ppblock);
}
=== Cut ===
with
gcc -Os -march=k6 -mregparm=3 -fno-unit-at-a-time -c
drivers/mtd/nand/nand_base.c
gives:
drivers/mtd/nand/nand_base.c:19: error: unable to find a register to spill in
class ‘CREG’
drivers/mtd/nand/nand_base.c:19: error: this is the insn:
(insn:HI 19 18 46 0 (parallel [
(set (reg/v:SI 3 bx [orig:59 ppblock ] [59])
(ashift:SI (reg/v:SI 3 bx [orig:59 ppblock ] [59])
(subreg:QI (reg:SI 0 ax [orig:65
<variable>.phys_erase_shift ] [65]) 0)))
(clobber (reg:CC 17 flags))
]) 280 {*ashlsi3_1} (insn_list:REG_DEP_TRUE 17 (insn_list:REG_DEP_TRUE
18 (nil)))
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_DEAD (reg:SI 0 ax [orig:65 <variable>.phys_erase_shift ]
[65])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_EQUAL (ashift:SI (const_int 1 [0x1])
(subreg:QI (reg:SI 67) 0))
(nil))))))
drivers/mtd/nand/nand_base.c:19: internal compiler error: in spill_failure, at
reload1.c:1878
gcc version 4.0.1 20050701 (prerelease)
--
Summary: unable to find a register to spill in cl
ass ‘CREG’
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mueller at kde dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i586-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22537