[llvm-bugs] [Bug 50581] Compiler "clang" makes optimization error (Ubuntu 20.04.2 LTS, clang version 10.0.0-4ubuntu1)
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 4 13:59:18 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50581
David Blaikie <dblaikie at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dblaikie at gmail.com
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #2 from David Blaikie <dblaikie at gmail.com> ---
Yep, undefined behavior:
$ clang++ -fsanitize=undefined test.cpp && ./a.out
test.cpp:8:12: runtime error: reference binding to null pointer of type
'AnyClassOrType'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior test.cpp:8:12 in
nullptr == Ptr true
nullptr == RefPtr true
RefPtr == (nil)
--
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/20210604/2bb4e23d/attachment.html>
More information about the llvm-bugs
mailing list