Do we abuse the "nsw" flag

Hi, There:

    Clang fails to compile 254.gap @ CPU2000int suite. The symptom is that executable fail to run
with reference input.

    The root cause is that the compiler mistakenly optimizes expr "x * y / y" into x where the x*y is blindly
flagged with nsw without any analysis.

     The preproceeded code is excerpted bellow:

cat -n integer.i

This has come up before, and we just added -fwrapv to work around the problem:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110131/115969.html

Are you compiling without -fwrapv?

Cameron

Signed arithmetic overflow is undefined in C and C++.

- David

It works like a charm! Thanks a lot!

Shuxin