Assertion failed: ((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"), function computeKnownBits, file /usr/src/contrib/llvm/lib/Analysis/ValueTracking.cpp, line 1594.
cc: error: unable to execute command: Abort trap
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 4.0.0 (branches/release_40 293443) (based on LLVM 4.0.0)
Thread model: posix
Created attachment 179444 [details]
src/buffer.c (preprocessed, compressed)
Created attachment 179445 [details]
command line args (for clang 4.0)
Reproduced, test case submitted in upstream bug:
A commit references this bug:
Date: Thu Feb 2 23:01:30 UTC 2017
New revision: 313110
Pull in r293773 from upstream llvm trunk (by Sanjay Patel):
[ValueTracking] avoid crashing from bad assumptions (PR31809)
A program may contain llvm.assume info that disagrees with other
analysis. This may be caused by UB in the program, so we must not
crash because of that.
As noted in the code comments:
...we can do better, but this at least avoids the assert/crash in the
Differential Revision: https://reviews.llvm.org/D29395
This fixes an assertion when building editors/emacs-devel.
Should be fixed now. Note that upstream has indicated that what emacs is doing is most likely some undefined behavior, so please take care. I have built emacs-devel with this fix, and it seems to work OK, with light testing (both in a terminal, and as an X client).