[llvm-bugs] [Bug 37119] New: Compiler miscompiling code after r329525 when optimizations are enabled
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 13 01:00:16 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37119
Bug ID: 37119
Summary: Compiler miscompiling code after r329525 when
optimizations are enabled
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: douglas_yung at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20186
--> https://bugs.llvm.org/attachment.cgi?id=20186&action=edit
repro code
One of our internal tests started to fail after r329525 was committed. The test
was automagically generated, so it is a bit messy, but I have cut it down to a
somewhat smaller sample that I am able to reproduce the issue with on linux
independent of our test framework.
To reproduce the problem, build a compiler that is r329525 or newer on x64
linux, and the build/run the attached test with (-O2) and without (-O0)
optimizations and compare the output of the line for id11513.
Steps:
clang++ -O0 repro3.cpp -o repro3.good
clang++ -O2 repro3.cpp -o repro3.bad
Output of produced executables on my machine:
$ ./repro3.good
{BEGIN}
id11095:-33.831909 -33.831909 -33.831909 -33.831909
id11513:0 ffffffff 0 ffffffff 0 ffffffff ffffffff ffffffff ffffffff 0 0 0
ffffffff ffffffff 0 0
{END}
$ ./repro3.bad
{BEGIN}
id11095:-33.831909 -33.831909 -33.831909 -33.831909
id11513:0 0 ffffffff ffffffff 0 ffffffff 0 ffffffff 0 ffffffff 0 0 0 ffffffff 0
0
{END}
Note that in the optimized case (repro3.bad), in id11513, elements 2, 3, 7, 9,
10 and 13 differ from the non-optimized case (repro3.good).
--
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/20180413/ce0260c7/attachment.html>
More information about the llvm-bugs
mailing list