[llvm-bugs] [Bug 39498] New: wrong code at -O3 on x86_64-linux-gnu (generated code hangs)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 30 04:57:08 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39498
Bug ID: 39498
Summary: wrong code at -O3 on x86_64-linux-gnu (generated code
hangs)
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Tested with trunk revision 345488.
$ clangpolly -v
clang version 8.0.0 (http://llvm.org/git/clang.git
8029b38886dd239769e3501dac21438e16886ce8) (llvm/trunk 345488)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clangpolly -O2 -w small.c; ./a.out
$
$ clangpolly -O3 -w small.c
$ timeout -s 9 5 ./a.out
Killed
$
--------------------------------------------
int a, b, c;
int main ()
{
int e = 7;
while (1)
{
int f = 2, g = 1, h = 126, *i = &h;
&a == i;
L1:
L2:
if (!h)
goto L1;
if (!f)
{
c = (g << h) || (c << 3);
goto L2;
}
b = e;
f = h = e = g;
g = b;
if (b)
break;
goto L2;
}
return 0;
}
--
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/20181030/1c6d9353/attachment.html>
More information about the llvm-bugs
mailing list