[LLVMbugs] [Bug 8604] New: Assertion `(unsigned)FI-LowSpillSlot < SpillSlotToUsesMap.size() && "Invalid spill slot"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 14 20:04:01 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8604

           Summary: Assertion `(unsigned)FI-LowSpillSlot <
                    SpillSlotToUsesMap.size() && "Invalid spill slot"'
                    failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu


Sorry for the horrendous test case, our reducer got stuck here.

regehr at home:~/volatile/bugs/tmp339$ clang -v

clang version 2.9 (trunk 119082)
Target: i386-pc-linux-gnu
Thread model: posix

regehr at home:~/volatile/bugs/tmp339$ clang -O3 -c -w -fomit-frame-pointer
small.c

clang: VirtRegMap.cpp:180: void llvm::VirtRegMap::addSpillSlotUse(int,
llvm::MachineInstr*): Assertion `(unsigned)FI-LowSpillSlot <
SpillSlotToUsesMap.size() && "Invalid spill slot"' failed.
0  clang 0x093cde58
Stack dump:
0.    Program arguments:
/mnt/z/z/compiler-install/llvm-gcc-r119082-install/bin/clang -cc1 -triple
i386-pc-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -masm-verbose -mconstructor-aliases -target-cpu
pentium4 -target-linker-version 2.20.51 -resource-dir
/mnt/z/z/compiler-install/llvm-gcc-r119082-install/bin/../lib/clang/2.9 -O3 -w
-ferror-limit 19 -fmessage-length 94 -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'small.c'.
4.    Running pass 'Linear Scan Register Allocator' on function '@int321'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

regehr at home:~/volatile/bugs/tmp339$ cat small.c

extern void __assert_fail (__const char *__assertion, __const char *__file,
               unsigned int __line, __const char *__function)
  __attribute__ ((__)) __attribute__ ((__noreturn__));

static unsigned char
foo (signed char si1, unsigned char si2)
{
  return si1 - si2;
}

static unsigned char
bar (signed char left, unsigned int right)
{
  return left || right || left >> right ? left : left << right;
}

static unsigned char
baz (signed char left, unsigned int right)
{
  return left < 0 || right ? left : left >> right;
}

static unsigned char
bux (unsigned ui1, unsigned char ui2)
{
  return ui1 - ui2;
}

static unsigned long long
biz (unsigned long long ui1, unsigned long long ui2)
{
  return ui2 ? : (ui1 / ui2);
}

struct S0
{
  unsigned char f1;
};

struct S3
{
  signed f0:1;
};

struct S4
{
  volatile unsigned f8:1;
  const unsigned f9:1;
};

struct S5
{
  const unsigned char f0;
};

struct S6
{
  const struct S5 f2;
  struct S3 f3;
};

unsigned char g_20[7] = {
  0
};

struct S6 g_67[5][9][1][1] = {
};

struct S6 *g_66[1] = {
  &g_67[2][3][0][0]
};

struct S6 g_71[10][6] = {
};

struct S4 g_88 = {
  0
};

short *g_94 = &g_20[2];

struct S6 ***g_114[6] = {
  0
};

struct S4 g_173 = {
  0
};

struct S6 g_252 = {
  0x17D44FB6F4A190B2LL, {
             }
  , 0
};

struct S0 g_314 = {
};

struct S6 **g_335[5] = {
  &g_66[0], &g_66[0], &g_66[0], &g_66[0], &g_66[0]
};

unsigned char g_429[2] = {
  0
};

const short *g_428 = &g_429[0];

int func_78 (struct S6 ***const p_79, signed char p_80, unsigned p_81);

int321 (void)
{
  struct S6 *l_301;
  long long l_366;
  int i;
lbl_493:{
    struct S6 **l_327 = &l_301;
    struct S6 ***const l_326 = &l_327;
    func_78 (l_326, g_173.f8, 0) & g_429[0]
      && g_428 <= &g_429[1] ? : _fail ("", "rand005597.c",
                       __PRETTY_FUNCTION__);
  }
  unsigned char l_468 = 1;
  struct S6 *l_475[1];
  for (0; 1; l_366 = safe (l_366, 1))
    if (bux (bar (*g_94, 0), 0) | func_78 (&g_335[4], 1, 0))
      {
    unsigned char l_480[9];
    l_480[i] = 0;
    l_480[6] =
      biz (l_468,
           func_78) >= (func_82 (g_114[1], g_252.f2.f0,
                     l_475[0]) <= baz (foo (*g_94,
                                *g_428) > 0,
                               *g_428));
    &g_20[0]
      && g_94 <= &g_20[6] ? : __assert_fail ("", "rand005597.c", 757,
                         __PRETTY_FUNCTION__);
    if (g_314.f1)
      goto lbl_493;
      }
}

int
func_78 (struct S6 ***const p_79, signed char p_80, unsigned p_81)
{
  struct S6 ***l_90[3];
  unsigned char l_93 = func_82 (l_90[1], g_88.f9);
  return l_93;
}

int
func_82 (struct S6 ***p_83, struct S2 *const int32p_85, int p_86)
{
  return g_71[9][4].f3.f0;
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list