http://llvm.org/bugs/show_bug.cgi?id=20094
Bug ID: 20094
Summary: miscompilation of shared mem linked list code
Product: clang
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 12690
--> http://llvm.org/bugs/attachment.cgi?id=12690&action=edit
code that fails
clang miscompiles shlist_remove() function in attached code.
when removing only element from list, both structs should end up with zeroes,
but clang code fails.
uncommenting the magic printf() or disabling optimizations will fix it.
$ clang -v
Ubuntu clang version 3.4.1-1~exp1 (branches/release_34) (based on LLVM 3.4.1)
Target: x86_64-pc-linux-gnu
$ clang -O shlist.c
$ ./a.out
after remove:
list: 16 / 16
node: 0 / 0
fail: list
$ clang -O0 shlist.c
$ ./a.out
after remove:
list: 0 / 0
node: 0 / 0
OK
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs