[LLVMbugs] [Bug 15700] New: Assertion failure '!isImplicitAccess()' involving decltype and default function template arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 8 01:54:58 PDT 2013


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

            Bug ID: 15700
           Summary: Assertion failure '!isImplicitAccess()' involving
                    decltype and default function template arguments
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zeratul976 at hotmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

For the following code:


struct S
{
    template <typename T, typename U = int>
    U foo_impl(T);

    template <typename T>
    auto foo(T t) -> decltype(foo_impl(t));
};

int main()
{
    S s;
    s.foo(0);
}


with clang r178972 I get the following assertion failure:


clang: llvm/tools/clang/lib/AST/../../include/clang/AST/ExprCXX.h:3227: const
clang::Expr *clang::UnresolvedMemberExpr::getBase() const: Assertion
`!isImplicitAccess()' failed.
0  clang           0x0000000001e903d5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  clang           0x0000000001e908c3
2  libpthread.so.0 0x00007f398af678f0
3  libc.so.6       0x00007f398a05ab25 gsignal + 53
4  libc.so.6       0x00007f398a05e670 abort + 384
5  libc.so.6       0x00007f398a0539f1 __assert_fail + 241
6  clang           0x00000000011b77ed
7  clang           0x00000000011b7dc5
8  clang           0x00000000011b3211
9  clang           0x00000000011bb55d
10 clang           0x00000000011ae0bd
11 clang           0x000000000081ec8f
clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl) + 751
12 clang           0x0000000000823a3b
clang::CodeGen::CodeGenModule::GetAddrOfFunction(clang::GlobalDecl,
llvm::Type*, bool) + 75
13 clang           0x00000000008c7105
clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(clang::CXXMemberCallExpr
const*, clang::CodeGen::ReturnValueSlot) + 1413
14 clang           0x00000000008bb6e6
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 262
15 clang           0x00000000008ea148
16 clang           0x00000000008e3d1d
17 clang           0x00000000008dcbfd
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 93
18 clang           0x00000000008aad29
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 249
19 clang           0x00000000008aac29
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 57
20 clang           0x000000000093a177
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 343
21 clang           0x000000000093fd8b
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 91
22 clang           0x0000000000817eb9
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 713
23 clang           0x0000000000822f27
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 663
24 clang           0x0000000000820284
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 228
25 clang           0x000000000082235d
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 781
26 clang           0x00000000008255b5
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 1173
27 clang           0x000000000080cb3f
28 clang           0x000000000080bfd7
29 clang           0x0000000000959253 clang::ParseAST(clang::Sema&, bool, bool)
+ 435
30 clang           0x000000000080b5a2 clang::CodeGenAction::ExecuteAction() +
194
31 clang           0x0000000000692c81 clang::FrontendAction::Execute() + 113
32 clang           0x000000000067293d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
33 clang           0x00000000006594f7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3031
34 clang           0x000000000064f615 cc1_main(char const**, char const**, char
const*, void*) + 693
35 clang           0x00000000006564f1 main + 8609
36 libc.so.6       0x00007f398a045c4d __libc_start_main + 253
37 clang           0x000000000064f229
Stack dump:
0.      Program arguments: /home/nr/Programs/clang/clang-3.3-20130406/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name test2.cpp -mrelocation-model static -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.20.1
-coverage-file /home/nr/Dev/Projects/C++/test/test.o -resource-dir
/home/nr/Programs/clang/clang-3.3-20130406/bin/../lib/clang/3.3
-internal-isystem
/home/nr/Programs/gcc/gcc-4.8.0/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0
-internal-isystem
/home/nr/Programs/gcc/gcc-4.8.0/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu
-internal-isystem
/home/nr/Programs/gcc/gcc-4.8.0/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
-internal-isystem
/home/nr/Programs/gcc/gcc-4.8.0/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/x86_64-unknown-linux-gnu/c++/4.8.0
-internal-isystem /usr/local/include -internal-isystem
/home/nr/Programs/clang/clang-3.3-20130406/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/home/nr/Dev/Projects/C++/test -ferror-limit 19 -fmessage-length 0
-mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -backend-option
-vectorize-loops -o test.o -x c++ src/test.cpp
1.      <eof> parser at end of file
2.      src/test2.cpp:10:5: LLVM IR generation of declaration 'main'
3.      src/test2.cpp:10:5: Generating code for declaration 'main'
4.      src/test2.cpp:7:10: Mangling declaration 'S::foo'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 178972)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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/20130408/2fe3f79f/attachment.html>


More information about the llvm-bugs mailing list