[LLVMbugs] [Bug 12779] New: Error recovery can trigger Assertion `!Init->isValueDependent()' (Decl.cpp:1436)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 9 12:25:07 PDT 2012


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

             Bug #: 12779
           Summary: Error recovery can trigger Assertion
                    `!Init->isValueDependent()' (Decl.cpp:1436)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hfinkel at anl.gov
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8522
  --> http://llvm.org/bugs/attachment.cgi?id=8522
reduced test case (provided by C.S.)

Running clang trunk on:

 template<typename _CharT, typename _InIter> class num_get : public
locale::facet {
   };
        template<typename _ValueT> template<typename _CharT, typename _OutIter>
_OutIter num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base&
__io, _CharT __fill, _ValueT __v) const {
    const int __ilen = 5 * sizeof(_ValueT);

results in:

In file included from prog.cpp:1:
prog.cpp:1:69: error: use of undeclared identifier 'locale'
 template<typename _CharT, typename _InIter> class num_get : public
locale::facet {
                                                                    ^
prog.cpp:1:77: error: expected class name
 template<typename _CharT, typename _InIter> class num_get : public
locale::facet {
                                                                            ^
prog.cpp:3:90: error: no template named 'num_put'; did you mean 'num_get'?
  ..._ValueT> template<typename _CharT, typename _OutIter> _OutIter
num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io,...
                                                                    ^~~~~~~
                                                                    num_get
prog.cpp:1:52: note: 'num_get' declared here
 template<typename _CharT, typename _InIter> class num_get : public
locale::facet {
                                                   ^
prog.cpp:3:146: error: unknown type name 'ios_base'
  ...typename _OutIter> _OutIter num_put<_CharT, _OutIter>::
_M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, _ValueT __v) const {
                                                                               
         ^
prog.cpp:3:118: error: nested name specifier 'num_get<_CharT, _OutIter>::' for
declaration does not refer into a class, class template or class
      template partial specialization
  ...template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT,
_OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io, _CharT...
                                                          
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
clang: /nfs2/hfinkel/src/llvm-trunk-writable/tools/clang/lib/AST/Decl.cpp:1436:
bool clang::VarDecl::checkInitIsICE() const: Assertion
`!Init->isValueDependent()' failed.

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