https://bugs.llvm.org/show_bug.cgi?id=51644

            Bug ID: 51644
           Summary: candidate template ignored: substitution failure [with
                    U = float]: variable length array cannot be formed
                    during template argument deduction
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Created attachment 25196
  --> https://bugs.llvm.org/attachment.cgi?id=25196&action=edit
c++test.cpp

The attached testcase fails:

c++test.cpp:16:12: error: no matching member function for call to 'mmm'
        return ph.mmm(data, 10);
               ~~~^~~
c++test.cpp:10:14: note: candidate template ignored: substitution failure [with
U = float]: variable length array cannot be formed during template argument
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >= width of type
[-Wshift-count-overflow]
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
                           ^ ~~~~~~~
1 warning and 1 error generated.
[yuri@yv /disk-samsung/freebsd-ports/audio/calf-lv2]$ c++ -std=c++11 -c
c++test.cpp 
c++test.cpp:16:12: error: no matching member function for call to 'mmm'
        return ph.mmm(data, 10);
               ~~~^~~
c++test.cpp:10:14: note: candidate template ignored: substitution failure [with
U = float]: variable length array cannot be formed during template argument
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >= width of type
[-Wshift-count-overflow]
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
                           ^ ~~~~~~~
1 warning and 1 error generated.


clang-11
FreeBSD 13

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to