[LLVMbugs] [Bug 7511] New: 'Cannot deduce non-type template argument with depth > 0' in boost::msm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 27 05:51:43 PDT 2010


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

           Summary: 'Cannot deduce non-type template argument with depth >
                    0' in boost::msm
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=5121)
 --> (http://llvm.org/bugs/attachment.cgi?id=5121)
ICEing example reduced from boost::msm

The attached code is reduced from code whch causes the assertion 'Cannot deduce
non-type template argument with depth > 0' in boost::msm. I suspect the
original code of being invalid, but it's hard to debug with the assert
occurring.

Here is the output backtrace:

t.cc:1:10: error: unknown type name 'a'
template<a>
         ^
t.cc:4:10: error: unknown type name 'a'                                         
template<a>
         ^
t.cc:4:1: error: extraneous template parameter list in template specialization
or out-of-line template definition                                              
template<a>
^~~~~~~~~~~
t.cc:8:16: error: expected ';' at end of declaration list                       
  typedef T1 ae
               ^
               ;                                                                
t.cc:13:31: error: expected ';' at end of declaration list                      
  typedef ac<1,int,int>::ae ae
                              ^
                              ;                                                 
t.cc:32:15: error: use of undeclared identifier 'a'                             
    struct In<a::int_<aaa::a>,my>;
              ^
t.cc:39:4: error: expected ';' after struct                                     
  }
   ^
   ;                                                                            
t.cc:44:23: error: expected ';' after expression                                
    helper->process(0)
                      ^
                      ;                                                         
t.cc:37:10: error: use of undeclared identifier 'a'                             
      In<a::int_<0> > a;
         ^
clang: SemaTemplateDeduction.cpp:103: clang::Sema::TemplateDeductionResult
DeduceNonTypeTemplateArgument(clang::Sema&, clang::NonTypeTemplateParmDecl*,
llvm::APSInt, clang::QualType, bool, clang::Sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&): Assertion
`NTTP->getDepth() == 0 && "Cannot deduce non-type template argument with depth
> 0"' failed.
0  clang           0x000000000158d0c4
1  clang           0x000000000158cf88
2  libpthread.so.0 0x00007f55000e38f0
3  libc.so.6       0x00007f54ff3d3a75 gsignal + 53
4  libc.so.6       0x00007f54ff3d75c0 abort + 384
5  libc.so.6       0x00007f54ff3cc941 __assert_fail + 241
6  clang           0x000000000080e471
7  clang           0x0000000000810e52
8  clang           0x000000000081102a
9  clang           0x0000000000811c6c
10 clang           0x000000000081ce75
11 clang           0x000000000085dfc5
12 clang           0x000000000085e443
13 clang           0x00000000006e3077
14 clang           0x000000000084c267
15 clang           0x0000000000854abf
16 clang           0x0000000000851104
17 clang           0x000000000081a95f
18 clang           0x0000000000828f09
19 clang           0x000000000081f809
20 clang           0x000000000083de61
21 clang           0x0000000000828dcd
22 clang           0x000000000081f73b
23 clang           0x000000000081dbd4
24 clang           0x00000000008526ee
25 clang           0x000000000085445f
26 clang           0x00000000008528a1
27 clang           0x000000000085445f
28 clang           0x000000000069e5a4
29 clang           0x0000000000acd12b
30 clang           0x000000000069beb8
31 clang           0x00000000004521d0
32 clang           0x000000000055afb5
33 clang           0x0000000000451e35
34 clang           0x000000000043bcd4
35 clang           0x000000000040948e
36 clang           0x0000000000412240 main + 357
37 libc.so.6       0x00007f54ff3bec4d __libc_start_main + 253
38 clang           0x0000000000407e29
Stack dump:
0.      Program arguments: /llvmdebug/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir /llvmdebug/lib/clang/2.0
-ferror-limit 19 -fmessage-length 173 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-Uheqiy.s -x c++ t.cc 
1.      <eof> parser at end of file
2.      t.cc:41:7: instantiating function definition 'state_machine<int>::ant'
3.      t.cc:35:9: instantiating function definition
'state_machine<int>::region_processing_helper<int>::process'
clang: error: clang frontend command failed due to signal 6 (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