[LLVMbugs] [Bug 9488] New: clang crash if auto deduction deduces 'void &' type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 15 15:56:44 PDT 2011


           Summary: clang crash if auto deduction deduces 'void &' type
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

This causes clang to assert:

  void f();
  auto &&a = f();

Like so:

clang: lib/Serialization/../../include/clang/AST/Type.h:388: const
clang::ExtQualsTypeCommonBase* clang::QualType::getCommonPtr() const: Assertion
`!isNull() && "Cannot retrieve a NULL type pointer"' failed.
0  libLLVM-2.9svn.so 0x00007faa5cc2566f
1  libLLVM-2.9svn.so 0x00007faa5cc278e2
2  libpthread.so.0   0x00007faa5bcc68f0
3  libc.so.6         0x00007faa5afb5a75 gsignal + 53
4  libc.so.6         0x00007faa5afb95c0 abort + 384
5  libc.so.6         0x00007faa5afae941 __assert_fail + 241
6  clang             0x00000000005f8851
7  clang             0x0000000000baac24
clang::ASTContext::getAsArrayType(clang::QualType) const + 148
8  clang             0x000000000084eab9
clang::ASTContext::getAsIncompleteArrayType(clang::QualType) const + 9
9  clang             0x000000000083aeeb
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) + 123

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