[LLVMbugs] [Bug 18351] 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)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jan 1 06:22:12 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18351
Bug ID: 18351
Summary: fatal error: atomic store operand must be power-of-two
byte-sized integer (with -flto and -O1 and greater)
(clang3.3 and clang3.4)
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: mail at hanicka.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11802
--> http://llvm.org/bugs/attachment.cgi?id=11802&action=edit
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)
--
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/20140101/d5f47d2e/attachment.html>
More information about the llvm-bugs
mailing list