[LLVMbugs] [Bug 7698] New: clang++ crashes parsing template with member array with size dependent of template parameter

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 23 18:03:22 PDT 2010


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

           Summary: clang++ crashes parsing template with member array
                    with size dependent of template parameter
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


A reduce test case of a c++ code that crashes clang parser:

------------------------

template<typename Type>
class A {
  char mA[sizeof(Type *)];
  A(): mA() {}
};

------------------------

clang version 2.8 (trunk 109288)
Target: x86_64-apple-darwin10
Thread model: posix

clang++ -c test.cpp
…
3  libSystem.B.dylib 000000000000000000 _sigtramp + 2066889920
4  clang             0x00000001003865bf
clang::Sema::MaybeCreateCXXExprWithTemporaries(clang::Expr*) + 31
5  clang             0x0000000100390cc4
clang::Sema::MaybeCreateCXXExprWithTemporaries(clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>)
+ 116
6  clang             0x0000000100305889
clang::Sema::BuildMemberInitializer(clang::FieldDecl*, clang::Expr**, unsigned
int, clang::SourceLocation, clang::SourceLocation, clang::SourceLocation) 
…
clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)

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