https://llvm.org/bugs/show_bug.cgi?id=30987
Bug ID: 30987 Summary: Wrong code/bug at -O2 on x86_64-unknown-freebsd11.0 Product: clang Version: trunk Hardware: PC OS: FreeBSD Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: m...@mikaelsimonsson.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17581 --> https://llvm.org/bugs/attachment.cgi?id=17581&action=edit Test case Using latest snapshot of Clang on FreeBSD: 4.0.d20161003 % clang++-devel -v clang version 4.0.0 Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/local/llvm-devel/bin % clang++39 -v clang version 3.9.0 (tags/RELEASE_390/final) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/local/llvm39/bin % clang++-devel -O2 -std=c++1z -stdlib=libc++ b.cc -O1 or lower works on both versions, -O2 or -O3 does not. Code works on gcc7 with all optimization levels. Sorry about the large test case, tried to simplify as much as I could. Expected output: 1 Actual output (or similar): -121 -120 -119 No match: -121 0 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs