[Bug 258079] clang-11 fails: candidate template ignored: substitution failure [with U = float]: variable length array cannot be formed during template argument deduction

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 27 Aug 2021 09:34:22 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258079

            Bug ID: 258079
           Summary: clang-11 fails: candidate template ignored:
                    substitution failure [with U = float]: variable length
                    array cannot be formed during template argument
                    deduction
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs_at_FreeBSD.org
          Reporter: yuri_at_freebsd.org
 Attachment #227468 text/plain
         mime type:

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

clang-11 fails on the attached testcase, bug g++10 succeeds.

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


audio/calf-lv2 had USE_GCC=yes because of this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Aug 27 2021 - 09:34:22 UTC

Original text of this message