<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 - Risc-V C compiler assert"
href="https://bugs.llvm.org/show_bug.cgi?id=42114">42114</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Risc-V C compiler assert
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</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>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>grogers@micron.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22066" name="attach_22066" title="source file">attachment 22066</a> <a href="attachment.cgi?id=22066&action=edit" title="source file">[details]</a></span>
source file
They compiler asserts when compiling this code fragment:
void
test(int n, complex double s[], complex double a[], complex double b)
{
int i;
for (i=0;i<n;i++)
s[i] = a[i] + b;
}
Here is the assert backtrace:
fatal error: error in backend: Cannot select: 0x560625bd9208: f64 = bitcast
0x560625bd9750
0x560625bd9750: i64,ch = CopyFromReg 0x560625bd8f98:1, Register:i64 %18
0x560625bd8f30: i64 = Register %18
In function: test
clang-8: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.0
Target: riscv64-unknown-unknown-elf
Thread model: posix
InstalledDir:
/nethome/grogers/scratch/emd/emd/../llvm-riscv-tools/riscv-build/riscv/bin
Here is the compile line:
ripsaw: grogers: bugs $ cat dcmplx3-b0fbc4.sh
# Crash reproducer for clang version 8.0.0
# Driver args: "-O2" "-I" "/nethome/grogers/scratch/emd/emd/simlib/include"
"dcmplx3.r5.c" "-L/nethome/grogers/scratch/emd/emd/emd-clang/simlib/lib"
"-Wl,-static" "-lhtp_runtime" "-o" "dcmplx3.r5.exe"
# Original command: "/work/grogers/llvm-project/riscv-build/riscv/bin/clang-8"
"-cc1" "-triple" "riscv64-unknown-unknown-elf" "-emit-obj" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"dcmplx3.r5.c" "-mrelocation-model" "static" "-mthread-model" "posix"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-nostdsysteminc"
"-fuse-init-array" "-target-abi" "lp64" "-dwarf-column-info"
"-debugger-tuning=gdb" "-momit-leaf-frame-pointer" "-resource-dir"
"/work/grogers/llvm-project/riscv-build/riscv/lib/clang/8.0.0" "-I"
"/nethome/grogers/scratch/emd/emd/simlib/include" "-isysroot"
"/nethome/grogers/scratch/emd/llvm-riscv-tools/riscv-build/riscv/riscv64-unknown-elf"
"-internal-isystem"
"/nethome/grogers/scratch/emd/llvm-riscv-tools/riscv-build/riscv/riscv64-unknown-elf/include"
"-O2" "-fdebug-compilation-dir"
"/nethome/grogers/scratch/emd/emd/htp-tests/apps/complex" "-ferror-limit" "19"
"-fmessage-length" "80" "-fno-signed-char" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops"
"-vectorize-slp" "-o" "/tmp/dcmplx3-8b042e.o" "-x" "c" "dcmplx3.r5.c"
"-faddrsig"
"/work/grogers/llvm-project/riscv-build/riscv/bin/clang-8" "-cc1" "-triple"
"riscv64-unknown-unknown-elf" "-emit-obj" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"dcmplx3.r5.c" "-mrelocation-model" "static" "-mthread-model" "posix"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-nostdsysteminc"
"-fuse-init-array" "-target-abi" "lp64" "-dwarf-column-info"
"-debugger-tuning=gdb" "-momit-leaf-frame-pointer" "-O2" "-ferror-limit" "19"
"-fmessage-length" "80" "-fno-signed-char" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops"
"-vectorize-slp" "-x" "c" "dcmplx3-b0fbc4.c" "-faddrsig"</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>