[llvm-bugs] [Bug 25609] Assertion UNREACHABLE: "Unexpected ProgramPoint" with widen-loops=true

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 7 07:39:53 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=25609

Alexander Kornienko <alexfh at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |alexfh at google.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Alexander Kornienko <alexfh at google.com> ---
I can't reproduce this now (even with assertions-enabled build of clang). This
must have been fixed already.

$ cat /tmp/q.cc 
int *p;
void bar();

void foo() {
    if (p == 0)
        bar();
    for (int i = 0; i < 99; i++) {}
    int x = p[0];
}
$ clang -cc1 -analyze -analyzer-checker core,alpha,unix,cplusplus
-analyzer-config widen-loops=true /tmp/q.cc
/tmp/q.cc:8:13: warning: Array access (from variable 'p') results in a null
pointer dereference
    int x = p[0];
            ^~~~
1 warning generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180507/a37cccc9/attachment.html>


More information about the llvm-bugs mailing list