<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - fatal error: atomic store operand must be power-of-two byte-sized integer (with -flto and -O1 and greater) (clang3.3 and clang3.4)"
href="http://llvm.org/bugs/show_bug.cgi?id=18351">18351</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fatal error: atomic store operand must be power-of-two byte-sized integer (with -flto and -O1 and greater) (clang3.3 and clang3.4)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mail@hanicka.net
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11802" name="attach_11802" title="Minimal code to reproduce error">attachment 11802</a> <a href="attachment.cgi?id=11802&action=edit" title="Minimal code to reproduce error">[details]</a></span>
Minimal code to reproduce error
I'm doing some experiment with my work project and -flto and I ran into bug:
atomic store operand must be power-of-two byte-sized integer
%.b = load atomic i1* @go.0 seq_cst, align 1
i1Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
1. Running pass 'Module Verifier' on function '@_Z4loopi'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: linker command failed due to signal (use -v to see invocation)
(this is happen on clang bundled with latest XCode and even with Clang3.4 from
tags/RELEASE_34/final ) on OSX, on Linux/CentOS6.5 with clang3.4 I cannot
reproduce this bug.
Bug didn't happen if you set -O0.
In attachment is minimal code to reproduce error.
==== INVOKING CLANG 3.4 ====
/opt/llvm-3.4/bin/clang src/mains/bug.cpp -std=c++11 -lc++ -O1 -flto -v
clang version 3.4 (tags/RELEASE_34/final 198162)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
"/opt/llvm-3.4/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm-bc
-disable-free -main-file-name bug.cpp -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 224.1 -v -resource-dir
/opt/llvm-3.4/bin/../lib/clang/3.4 -stdlib=libc++ -O1 -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/hanka/Desktop/nos
-ferror-limit 19 -fmessage-length 179 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-slp -o /var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/bug-7ee0c7.o
-x c++ src/mains/bug.cpp
clang -cc1 version 3.4 based upon LLVM 3.4 default target
x86_64-apple-darwin13.0.2
ignoring nonexistent directory "/opt/llvm-3.4/bin/../include/c++/v1"
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/opt/llvm-3.4/bin/../lib/clang/3.4/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/usr/bin/ld" -demangle -object_path_lto
/var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/cc-c81297.o -dynamic -arch
x86_64 -macosx_version_min 10.9.0 -o a.out
/var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/bug-7ee0c7.o -lc++ -lSystem
/opt/llvm-3.4/bin/../lib/clang/3.4/lib/darwin/libclang_rt.osx.a
atomic store operand must be power-of-two byte-sized integer
%.b = load atomic i1* @go.0 seq_cst, align 1
i1Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
1. Running pass 'Module Verifier' on function '@_Z4loopi'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: linker command failed due to signal (use -v to see invocation)
==== INVOKING CLANG 3.3 (bundled with XCode on 10.9) ====
nimue:nos hanka$ clang src/mains/bug.cpp -std=c++11 -lc++ -O1 -flto -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
-cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm-bc -disable-free
-disable-llvm-verifier -main-file-name bug.cpp -mrelocation-model pic
-pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 224.1 -v -resource-dir
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0
-stdlib=libc++ -O1 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/Users/hanka/Desktop/nos -ferror-limit 19 -fmessage-length 179 -stack-protector
1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/bug-3qjhQR.o -x c++
src/mains/bug.cpp
clang -cc1 version 5.0 based upon LLVM 3.3svn default target
x86_64-apple-darwin13.0.2
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle -object_path_lto
/var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/cc-J27IAS.o -dynamic -arch
x86_64 -macosx_version_min 10.9.0 -o a.out
/var/folders/w8/lcnx2c154135gftb7wr_j0tc0000gn/T/bug-3qjhQR.o -lc++ -lSystem
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/lib/darwin/libclang_rt.osx.a
atomic store operand must be power-of-two byte-sized integer
%.b = load atomic i1* @go.0.0.0 seq_cst, align 1
i1Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
1. Running pass 'Module Verifier' on function '@_Z4loopi'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: linker command failed due to signal (use -v to see invocation)</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>