[LLVMbugs] [Bug 8513] New: Assertion `From != To && "ReplaceAndSimplifyAllUses(X, X) is not valid!"' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 30 08:18:42 PDT 2010


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

           Summary: Assertion `From != To &&
                    "ReplaceAndSimplifyAllUses(X,X) is not valid!"' failed
           Product: new-bugs
           Version: unspecified
          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 nasty testcase.

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

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

regehr at home:~/volatile/bugs/tmp336$ clang -c -O -w small.c

clang: InstructionSimplify.cpp:461: void
llvm::ReplaceAndSimplifyAllUses(llvm::Instruction*, llvm::Value*, const
llvm::TargetData*): Assertion `From != To && "ReplaceAndSimplifyAllUses(X,X) is
not valid!"' failed.
0  clang 0x093b0918
Stack dump:
0.    Program arguments:
/mnt/z/z/compiler-install/llvm-gcc-r117785-install/bin/clang -cc1 -triple
i386-pc-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -target-linker-version 2.20.51 -resource-dir
/mnt/z/z/compiler-install/llvm-gcc-r117785-install/bin/../lib/clang/2.9 -O2 -w
-ferror-limit 19 -fmessage-length 80 -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'small.c'.
4.    Running pass 'Jump Threading' on function '@int326'
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/tmp336$ cat small.c

int g_15;
int *const g_14 = &g_15;
unsigned char g_59;
const unsigned char *g_102 = &g_15;
const unsigned char **g_101 = &g_102;
unsigned char g_115;

unsigned char func_54 (unsigned p_55, const unsigned char *** p_56)
{
  unsigned char l_57;
  g_59 &= ~l_57 < 0;
  return 0;
}

int int326 (int ** p_87, unsigned char p_88, unsigned char p_89)
{
  unsigned char l_96[3];
  const unsigned char ***l = &g_101;
  int i;
  l_96[i] = 0;
  for (0;;)
    {
      unsigned char l_127[8];
    lbl_104:if (*g_14)
    break;
      if (g_15)
    {
      unsigned char l_97[6];
      l_97[i];
      for (0; p_88;)
        if (l_96[2])
          if (l_97[2] && (func_54 (l_97[3], 0), 1 ? : +0) >= &l)
        {
        }
          else
        return l_97[2];
        else
          goto lbl_104;
      unsigned char *l_138 = &g_115;
      *l_138 ^= 0 == 0 ? : l_127[3], 0 > 0 && 0 > 0 || 0 < 0
        && 0 < 0 ? : +0 ? : +0 ? : 1 * 8 ? : 0 ? : +0;
    }
    }
  return 0;
}

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