[LLVMbugs] [Bug 16688] New: Inconsistent issue of the `ud2` instruction with clang++ -O0
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 23 22:17:11 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16688
Bug ID: 16688
Summary: Inconsistent issue of the `ud2` instruction with
clang++ -O0
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: i at maskray.me
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
`clang++ -O0` will issue a `ud2` instruction at the bottom of `f` while other
combinations of optimization flags and options for `clang++/clang` do not.
a.c:
int f() {}
int main() { f(); }
╰─% clang++ -w a.c && ./a.out
[1] 20275 illegal hardware instruction (core dumped) ./a.out
╭─ray @ lap >>= /tmp
╰─[$: 132] % clang -w a.c && ./a.out
╭─ray @ lap >>= /tmp
╰─% clang++ -w -O1 a.c && ./a.out
[1] 20334 segmentation fault (core dumped) ./a.out
╭─ray @ lap >>= /tmp
╰─[$: 139] % clang -w -O1 a.c && ./a.out
╭─ray @ lap >>= /tmp
╰─% clang++ -w -O2 a.c && ./a.out
[1] 20395 segmentation fault (core dumped) ./a.out
╭─ray @ lap >>= /tmp
╰─[$: 139] % clang -w -O2 a.c && ./a.out
--
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/20130724/5e09f89e/attachment.html>
More information about the llvm-bugs
mailing list