[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] Is this a wrong code bug?



Yes, this is either a wrong code bug in clang or else a bug where Csmith emitted an insufficiently defined program, you'll need to determine which of these is the case.

Also I'm confused about why gcc and clang would return different results -- generally they make the same decisions for implementation-defined behaviors. This is worth investigating as well.

John


On 1/25/19 3:56 AM, sameeran joshi wrote:
Hi,
compiling a program as
gcc -O0  --------> CHECKSUM : 72D53249
gcc -O1  --------> CHECKSUM : 72D53249
gcc -O2 --------> CHECKSUM : 72D53249
gcc -O3  --------> CHECKSUM : 72D53249
gcc -Os  --------> CHECKSUM : 72D53249
gcc -Ofast  --------> CHECKSUM : 72D53249

**clang -O0  --------> CHECKSUM : 2873C061**(differs)

clang -O1  --------> CHECKSUM : 10301700
clang -O2  --------> CHECKSUM : 10301700
clang -O3  --------> CHECKSUM : 10301700
clang -Os  --------> CHECKSUM : 10301700
clang -Ofast  --------> CHECKSUM : 10301700

is this a wrong code bug found using differential testing approach?
Thanks,
Sameeran Joshi