<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 - clang self-hosting failure: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:5428:7 signed integer overflow"
href="https://bugs.llvm.org/show_bug.cgi?id=33632">33632</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang self-hosting failure: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:5428:7 signed integer overflow
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lebedev.ri@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hi.
When trying to build clang stage 2 by freshly-built clang stage 1 (built by
fresh clang snapshot from apt.llvm.org), the build fails:
$ ninja -j1 -v
[1/2862] /build/llvm-build-Clang-release/bin/clang++ -DGTEST_HAS_RTTI=0
-DLLVM_BUILD_GLOBAL_ISEL -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Target/AMDGPU/MCTargetDesc
-I/build/llvm/lib/Target/AMDGPU/MCTargetDesc -I/build/llvm/lib/Target/AMDGPU
-Ilib/Target/AMDGPU -Iinclude -I/build/llvm/include -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics
-ffunction-sections -fdata-sections -O3 -UNDEBUG -fno-exceptions -fno-rtti
-MD -MT
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o
-MF
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o.d
-o
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o
-c /build/llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp
FAILED:
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o
/build/llvm-build-Clang-release/bin/clang++ -DGTEST_HAS_RTTI=0
-DLLVM_BUILD_GLOBAL_ISEL -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Target/AMDGPU/MCTargetDesc
-I/build/llvm/lib/Target/AMDGPU/MCTargetDesc -I/build/llvm/lib/Target/AMDGPU
-Ilib/Target/AMDGPU -Iinclude -I/build/llvm/include -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics
-ffunction-sections -fdata-sections -O3 -UNDEBUG -fno-exceptions -fno-rtti
-MD -MT
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o
-MF
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o.d
-o
lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/SIMCCodeEmitter.cpp.o
-c /build/llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp
/build/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:5428:7: runtime error: signed
integer overflow: 4602678819172646912 - -4620693217682128896 cannot be
represented in type 'long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/build/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:5428:7 in
ninja: build stopped: subcommand failed.
Configure command: (autogenerated by qtcreator)
stage1:
/usr/bin/cmake /build/llvm '-GCodeBlocks - Ninja'
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_CXX_COMPILER:STRING=/usr/local/bin/clang++
-DCMAKE_C_COMPILER:STRING=/usr/local/bin/clang -DLLVM_ENABLE_ASSERTIONS:BOOL=ON
'-DLLVM_ENABLE_PROJECTS:STRING=clang;libcxx;libcxxabi;compiler-rt;lld;polly;openmp'
'-DLLVM_USE_SANITIZER:STRING=Address;Undefined'
stage2:
/usr/bin/cmake /build/llvm '-GCodeBlocks - Ninja'
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_CXX_COMPILER:STRING=/build/llvm-build-Clang-release/bin/clang++
-DCMAKE_C_COMPILER:STRING=/build/llvm-build-Clang-release/bin/clang
'-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}'
-DLLVM_ENABLE_ASSERTIONS:BOOL=ON
'-DLLVM_ENABLE_PROJECTS:STRING=clang;libcxx;libcxxabi;compiler-rt;lld;polly;openmp'
-DLLVM_USE_SANITIZER:STRING= -DQT_QMAKE_EXECUTABLE:STRING=</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>