http://llvm.org/bugs/show_bug.cgi?id=19174
Benjamin Kramer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #1 from Benjamin Kramer <[email protected]> --- On linux, rand() without seed returns 1804289383. Multiplying this by 4 overflows a 32 bit integer, which is undefined behavior. The optimizer can use that fact to simplify code. To avoid the undefined behavior you can pass -fwrapv to clang. -- 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
