<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - compile-time explosion at -O3 on clang trunk version"
href="https://bugs.llvm.org/show_bug.cgi?id=50302">50302</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>compile-time explosion at -O3 on clang trunk version
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>haoxintu@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hi all.
I guess this is not a dup of <a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - compile-time explosion on valid C code at -O3 on clang trunk version"
href="show_bug.cgi?id=50279">bug 50279</a>, because the two test programs look
totally different, so I file a new report here. Please close this if they are
caused by the same issues.
$cat small.c
#include <stdint.h>
void a() {
int b = 0;
uint32_t c = 0;
int64_t d;
for (; d; d += 10)
c = d;
uint16_t e = 0;
uint8_t f = a;
uint8_t *g;
if (e) {
static int j;
int32_t *i = &j;
if (0) {
k:
if (*g || (*i &= 7))
goto k;
g = e;
goto k;
}
f = &j;
}
b &&f;
g = c;
goto k;
}
$clang -w -O3 small.c
//endless compiling
$clang -v
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
ea64200b6197d8db97a11db15a5906fc1eb5ef4a)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tuhaoxin/compilers/llvm-project/build/bin
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/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
Reproduced in Godbolt: <a href="https://godbolt.org/z/fPoabP7od">https://godbolt.org/z/fPoabP7od</a>
Thanks,
Haoxin</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>