[LLVMbugs] [Bug 12303] New: Undefined std::ctype<char>::_M_widen_init() when using iostream at optimization > 0
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 19 05:26:03 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12303
Bug #: 12303
Summary: Undefined std::ctype<char>::_M_widen_init() when using
iostream at optimization > 0
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: abigagli at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
On MacOSX 10.7.3, clang built in Release mode from trunk @r153013, libstdc++
from gcc 4.6.2:
$cat optimize.cpp
#include <iostream>
int main(int argc, const char *argv[])
{
std::cout << "hello" << std::endl;
return 0;
}
$clang++ -Wl,-demangle -v -O1 optimize.cpp -o optimize
clang version 3.1 (trunk 153013)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
"/Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/clang" -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -disable-free -main-file-name optimize.cpp
-pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-v -resource-dir /Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/../lib/clang/3.1
-fmodule-cache-path
/var/folders/59/_cxj9vx5675bjmykljv0vdm00000gn/T/clang-module-cache -O1
-fdeprecated-macro -fdebug-compilation-dir
/Users/abigagli/scratch/clang_experiments -ferror-limit 19 -fmessage-length 250
-stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/59/_cxj9vx5675bjmykljv0vdm00000gn/T/optimize-3hi0BR.o -x c++
optimize.cpp
clang -cc1 version 3.1 based upon LLVM 3.1svn default target
x86_64-apple-darwin11.3.0
#include "..." search starts here:
#include <...> search starts here:
/Users/abigagli/GCC-CURRENT/include/c++/4.6.2
/Users/abigagli/GCC-CURRENT/include/c++/4.6.2/x86_64-apple-darwin11.3.0
/Users/abigagli/GCC-CURRENT/include/c++/4.6.2/backward
/usr/local/include
/Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/../lib/clang/3.1/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld" -dynamic -arch
x86_64 -macosx_version_min 10.7.0 -o optimize -lcrt1.10.6.o -demangle
/var/folders/59/_cxj9vx5675bjmykljv0vdm00000gn/T/optimize-3hi0BR.o -lstdc++
-lSystem
/Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/../lib/clang/3.1/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"std::ctype<char>::_M_widen_init() const", referenced from:
std::ctype<char>::widen(char) const in optimize-3hi0BR.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Only compiling with -O0 succeeds.
NOTE: Using stdlib=libc++ or Apple's clang from Xcode 4.3 works at every
optimization level.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list