[LLVMbugs] [Bug 14342] New: Assertion `IsUnsigned == RHS.IsUnsigned` APSInt.h:139 (r167157)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 14 14:46:14 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14342

             Bug #: 14342
           Summary: Assertion `IsUnsigned == RHS.IsUnsigned` APSInt.h:139
                    (r167157)
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: gasper.azman at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Clang asked me to submit this so I am. I checked other signedness mismatch
reports and they looked similar, but not quite the same, so I'm still
submitting.

This was the backtrace:

Assertion failed: (IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"),
function operator==, file
/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_llvm-3.2/clang-3.2/work/trunk/include/llvm/ADT/APSInt.h,
line 139.
0  libLLVM-3.2svn.dylib 0x0000000111d4be52 _ZL15PrintStackTracePv + 34
1  libLLVM-3.2svn.dylib 0x0000000111d4c379 _ZL13SignalHandleri + 713
2  libsystem_c.dylib    0x00007fff9a8bbcfa _sigtramp + 26
3  clang                0x000000011049f50d
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 4845
4  libLLVM-3.2svn.dylib 0x0000000111d4c096 abort + 22
5  libLLVM-3.2svn.dylib 0x0000000111d4c055 __assert_rtn + 53
6  clang                0x0000000110955f90 (anonymous
namespace)::TemplateDiff::DiffTemplate(clang::TemplateSpecializationType
const*, clang::TemplateSpecializationType const*) + 4208
7  clang                0x0000000110951b46
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::DiagnosticsEngine::ArgumentKind, long> const*, unsigned int,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 1558
8  clang                0x0000000110acf8ea
clang::Diagnostic::FormatDiagnostic(char const*, char const*,
llvm::SmallVectorImpl<char>&) const + 2378
9  clang                0x000000011004d189
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 121
10 clang                0x0000000110ad3a68
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 504
11 clang                0x0000000110acee39
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 89
12 clang                0x0000000110312107
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 1543
13 clang                0x00000001104a1471
clang::InitializationSequence::Diagnose(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, clang::Expr**, unsigned int) + 1713
14 clang                0x000000011049e282
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 98
15 clang                0x000000011039922b
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) +
3067
16 clang                0x00000001105a0387
clang::TemplateDeclInstantiator::VisitVarDecl(clang::VarDecl*) + 1479
17 clang                0x00000001105ac11c
clang::DeclVisitor<clang::TemplateDeclInstantiator,
clang::Decl*>::Visit(clang::Decl*) + 796
18 clang                0x00000001105a844b clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 107
19 clang                0x00000001105882ad clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) + 3021
20 clang                0x00000001105993d3 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*,
bool) + 211
21 clang                0x00000001105881e4 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) + 2820
22 clang                0x00000001105876a7 clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) + 71
23 clang                0x00000001105a9841
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 1921
24 clang                0x00000001105aa753
clang::Sema::PerformPendingInstantiations(bool) + 483
25 clang                0x0000000110310417
clang::Sema::ActOnEndOfTranslationUnit() + 439
26 clang                0x00000001102db1e0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 176
27 clang                0x000000011026f2c6 clang::ParseAST(clang::Sema&, bool,
bool) + 342
28 clang                0x00000001102321cd
clang::CodeGenAction::ExecuteAction() + 1277
29 clang                0x000000011002826b clang::FrontendAction::Execute() +
107
30 clang                0x0000000110007cef
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 991
31 clang                0x000000010ffcfcd9
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3385
32 clang                0x000000010ffc655c cc1_main(char const**, char const**,
char const*, void*) + 3004
33 clang                0x000000010ffcbd5b main + 683
34 clang                0x000000010ffc5994 start + 52
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.2/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name
libnb_main.cpp -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 134.9 -g -coverage-file
/Users/atomicity/work/berkeley/neuroblaze/nb/CMakeFiles/nbtest.dir/libnb_main.cpp.o
-resource-dir /opt/local/libexec/llvm-3.2/bin/../lib/clang/3.2 -I
/opt/local/include -I /opt/local/include/matio.h -fmodule-cache-path
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/clang-module-cache
-stdlib=libc++ -Wall -Wshadow -Wextra -pedantic -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /Users/atomicity/work/berkeley/neuroblaze/nb
-ferror-limit 19 -fmessage-length 202 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/nbtest.dir/libnb_main.cpp.o -x c++
/Users/atomicity/work/berkeley/neuroblaze/nb/libnb_main.cpp 
1.    <eof> parser at end of file
2.    /Users/atomicity/work/berkeley/neuroblaze/nb/libnb.hpp:1261:9:
instantiating function definition 'operator()'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 167157)
Target: x86_64-apple-darwin11.4.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/libnb_main-UJSFp3.cpp
clang: note: diagnostic msg:
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/libnb_main-UJSFp3.sh
clang: note: diagnostic msg:

-- 
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