<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 - x32: error in backend: Unable to copy EFLAGS physical register!"
href="https://bugs.llvm.org/show_bug.cgi?id=38865">38865</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>x32: error in backend: Unable to copy EFLAGS physical register!
</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>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>theonetruecamper@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>reduced test case:
==> /tmp/test-c03594.cpp <==
# 1 "<built-in>"
# 1 "test.cpp"
struct a { a(const a&); };
a b() { return b(); }
==> /tmp/test-c03594.sh <==
# Crash reproducer for clang version 6.0.1 (tags/RELEASE_601/final)
# Driver args: "--driver-mode=g++" "-c" "test.cpp" "-O0" "-v"
# Original command: "/usr/lib/llvm/6/bin/clang-6.0" "-cc1" "-triple"
"x86_64-pc-linux-gnux32" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "test.cpp"
"-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
"-fuse-init-array" "-target-cpu" "x86-64" "-dwarf-column-info"
"-debugger-tuning=gdb" "-v" "-coverage-notes-file" "/home/sphinx/test.gcno"
"-resource-dir" "/usr/lib/llvm/6/bin/../../../../lib/clang/6.0.1"
"-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7"
"-internal-isystem"
"/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/x86_64-pc-linux-gnux32"
"-internal-isystem"
"/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/backward"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/lib/llvm/6/bin/../../../../lib/clang/6.0.1/include"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-O0" "-fdeprecated-macro" "-fdebug-compilation-dir"
"/home/sphinx" "-ferror-limit" "19" "-fmessage-length" "173"
"-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-o" "test.o" "-x" "c++"
"test.cpp"
"/usr/lib/llvm/6/bin/clang-6.0" "-cc1" "-triple" "x86_64-pc-linux-gnux32"
"-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier"
"-discard-value-names" "-main-file-name" "test.cpp" "-mrelocation-model"
"static" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array"
"-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb" "-v"
"-coverage-notes-file" "/home/sphinx/test.gcno" "-O0" "-fdeprecated-macro"
"-ferror-limit" "19" "-fmessage-length" "173" "-fobjc-runtime=gcc"
"-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-x" "c++" "test-c03594.cpp"
Attempting to compile with -O0 but not any other optimization level results in
this output, the problem also exists in trunk:
$ /usr/lib/llvm/6/bin/clang++ -c test.cpp -O0 -v -mx32
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-pc-linux-gnux32
Thread model: posix
InstalledDir: /usr/lib/llvm/6/bin
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0
Candidate multilib: .;@mx32
Candidate multilib: 64;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@mx32
"/usr/lib/llvm/6/bin/clang-6.0" -cc1 -triple x86_64-pc-linux-gnux32 -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name test.cpp -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -v -coverage-notes-file /home/sphinx/test.gcno
-resource-dir /usr/lib/llvm/6/bin/../../../../lib/clang/6.0.1 -internal-isystem
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7 -internal-isystem
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/x86_64-pc-linux-gnux32
-internal-isystem
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm/6/bin/../../../../lib/clang/6.0.1/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O0
-fdeprecated-macro -fdebug-compilation-dir /home/sphinx -ferror-limit 19
-fmessage-length 173 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++ test.cpp
clang -cc1 version 6.0.1 based upon LLVM 6.0.1 default target
x86_64-pc-linux-gnux32
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/x86_64-pc-linux-gnux32
/usr/lib/gcc/x86_64-pc-linux-gnux32/7.3.0/include/g++-v7/backward
/usr/lib/llvm/6/bin/../../../../lib/clang/6.0.1/include
/usr/include
End of search list.
fatal error: error in backend: Unable to copy EFLAGS physical register!
clang-6.0: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-pc-linux-gnux32
Thread model: posix
InstalledDir: /usr/lib/llvm/6/bin</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>