[LLVMbugs] [Bug 9141] New: Assertion failure in clang++ compiling invalid code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 4 14:48:20 PST 2011


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

           Summary: Assertion failure in clang++ compiling invalid code
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jbytheway+llvm at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=6103)
 --> (http://llvm.org/bugs/attachment.cgi?id=6103)
Output from compiling, including assertion failure and backtrace

The following (invalid) code triggers an assertion failure in clang++; it's a
FIXME so I guess it hardly needs a bug report, but I found it by accident while
trying to pin down #9140, so I thought I'd report it anyway.

The assertion is "ParseExprCXX.cpp:228: bool
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::ParsedType, bool, bool*): Assertion `false && "FIXME: Only type template
names supported here"' failed."; full output in the attachment.

The source code has been reduced with multidelta, so looks a bit odd.

$ clang++ --version
clang version 2.9 (trunk 124897)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ cat assertion.cpp 
namespace result_of {
  template < typename Sequence >
  struct end:extension::end_impl <
      typename detail::tag_of < Sequence >::type
    >::template apply < Sequence >
  {
  };
}

template < typename Sequence >
inline typename result_of::end <Sequence >::type const end(Sequence & seq)
{
  typedef typename end < Sequence >::type end_;
$ clang++ -o /dev/null assertion.cpp > compile-output 2>&1

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