[LLVMbugs] [Bug 5357] New: ice: Wrong MachineOperand accessor

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 30 22:14:29 PDT 2009


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

           Summary: ice: Wrong MachineOperand accessor
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


regehr at john-home:~/volatile/tmp217$ clang -c -w -O2 small.c 
clang-cc:
/home/regehr/z/tmp/llvm-r85644/include/llvm/CodeGen/MachineOperand.h:253: void
llvm::MachineOperand::setIsDead(bool): Assertion `isReg() && IsDef && "Wrong
MachineOperand accessor"' failed.
0  clang-cc 0x090a4928
Stack dump:
0.      Program arguments:
/home/regehr/z/tmp/llvm-gcc-r85644-install/bin/../libexec/clang-cc -triple
i386-pc-linux-gnu -S -disable-free -main-file-name small.c --relocation-model
static --disable-fp-elim --unwind-tables=0 --mcpu=pentium4 --fmath-errno=1 -O2
-w -fexceptions=0 -fdiagnostics-show-option -o /tmp/cc-sSGkCU.s -x c small.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Linear Scan Register Allocator' on function '@uint329'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)

regehr at john-home:~/volatile/tmp217$ clang -v

clang version 1.1 (trunk 85644)
Target: i386-pc-linux-gnu
Thread model: posix

regehr at john-home:~/volatile/tmp217$ cat small.c

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

static short foo (short _si1, unsigned char _si2)
{
  return _si1 > _si2 || _si1 <= +1 ? _si1 : _si1 * _si2;
}

static unsigned char bar (short _left, unsigned int _right)
{
  return 1 * 8 >> _right ? : 0;
}

static unsigned char baz (unsigned short _left, unsigned int _right)
{
  return 0 >= 1 * 8 ? 0 : _left;
}

unsigned char g_33;
unsigned char *g_44;
unsigned char ***g_145;
unsigned char *g_177;
unsigned char ***g_185;

int uint329 (int **p_30, unsigned char p_31)
{
  unsigned char *l_34 = &g_33;
  unsigned char **l_35 = &l_34;
  unsigned char ***l_36 = &l_35;
  unsigned char ***l_131 = &l_35;
  unsigned char l_166 = 4L;
  g_44 ? 0 : __assert_fail ("== 0", "small.c", 52, __PRETTY_FUNCTION__);
  g_145 ? 0 : __assert_fail ("== 0", "small.c", 54, __PRETTY_FUNCTION__);
  g_177 ? 0 : __assert_fail ("== 0", "small.c", 55, __PRETTY_FUNCTION__);
  g_185 ? 0 : __assert_fail ("== 0", "small.c", 56, __PRETTY_FUNCTION__);
  for (0; 1; 0)
    {
      if (***l_131)
        {
          g_44 ? 0 : __assert_fail ("== 0", "small.c", 71,
                                    __PRETTY_FUNCTION__);
          g_145 ? 0 : __assert_fail ("== 0", "small.c", 73,
                                     __PRETTY_FUNCTION__);
          g_177 ? 0 : __assert_fail ("== 0", "small.c", 74,
                                     __PRETTY_FUNCTION__);
          g_185 ? 0 : __assert_fail ("== 0", "small.c", 75,
                                     __PRETTY_FUNCTION__);
          if (safe
              (bar
               (func_38 (***l_131, g_145, func_49 (**l_36), 0) <= 0,
                baz (p_31, 0))), 1)
            {
              unsigned char ***l_156 = &l_35;
              if (0)
                {
                }
              else
                {
                  unsigned char **l_167 = &l_34;
                  **l_156 = func_49 (foo (p_31, l_166), ***l_131, l_167);
                  g_44 ? 0 : __assert_fail ("== 0", "small.c", 90,
                                            __PRETTY_FUNCTION__);
                }
            }
          g_145 ? 0 : __assert_fail ("== 0", "small.c", 102,
                                     __PRETTY_FUNCTION__);
          g_177 ? 0 : __assert_fail ("== 0", "small.c", 103,
                                     __PRETTY_FUNCTION__);
          g_185 ? 0 : __assert_fail ("== 0", "small.c", 104,
                                     __PRETTY_FUNCTION__);
        }
    }
}


-- 
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