Comment #2 on issue 5537 by k...@google.com: llvm/clang-proto-fuzzer: ASSERT: isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5537#c2

C reproducer:
% cat 5537.c
void foo(int *a) {
  a[0] = (15164);
  while (((((a[0] * a[0]) * a[0]) * ((a[0] * a[0]) * a[0])) * a[0])) {
    a[0] = (a[72] + a[0]);
  }
  while (((((a[72] * a[0]) * a[0]) * (a[0] * a[0])) * a[0])) {
    a[0] = ((1073741824) + a[0]);
  }
  (void)0;
  while ((1 ^ (a[84] & 1))) {
  }
  while ((1 / (a[0] + (a[0] + 1)))) {
    (void)0;
    a[28] = 1;
    a[0] = (a[0] + (0));
    a[0] = (1 / (1 ^ (a[0] + 1)));
  }
  while ((40)) {
    if (a[0]) {
      (void)0;
    } else {
    }
  }
}
% clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O3 5537.c PS1=%
clang: lib/Analysis/ScalarEvolution.cpp:3269: const llvm::SCEV *llvm::ScalarEvolution::getAddRecExpr(SmallVectorImpl<const llvm::SCEV *> &, const llvm::Loop *, SCEV::NoWrapFlags): Assertion `isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!"' failed.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to