[llvm-bugs] [Bug 46712] New: Clang hang on in valid code under -O1 ~ -Os at compile time
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 14 05:17:06 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46712
Bug ID: 46712
Summary: Clang hang on in valid code under -O1 ~ -Os at compile
time
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: haoxintu at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Hi, all.
This code, test.cc, is a valid code, but makes Clang hung on at compile time.
$cat test.cc
int a, b, c;
long d;
void e() {
long f(0 >= 0 <= ~(b && a));
c = a && (f || !d) && !0;
}
$time clang++-trunk -c -w -O0 test.cc
real 0m0.020s
user 0m0.012s
sys 0m0.008s
$time clang++-trunk -c -w -O1 test.cc
//endless compiling
Interestingly, Clang-10 works fine with this case. So, I guess this is a
regression issue in Clang-trunk.
$time clang++-10 -c -w test.cc
real 0m0.023s
user 0m0.014s
sys 0m0.009s
$clang++ -v
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
305b500eaf8c3b6a319e4571b4279a4694645d0d)
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/10
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/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
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Selected multilib: .;@m64
Thanks
Haoxin
--
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/20200714/ed8aa591/attachment.html>
More information about the llvm-bugs
mailing list