Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2021 09:34:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 258079] clang-11 fails: candidate template ignored: substitution failure [with U = float]: variable length array cannot be formed during template argument deduction
Message-ID:  <bug-258079-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258079

            Bug ID: 258079
           Summary: clang-11 fails: candidate template ignored:
                    substitution failure [with U =3D 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@FreeBSD.org
          Reporter: yuri@freebsd.org
 Attachment #227468 text/plain
         mime type:

Created attachment 227468
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227468&action=
=3Dedit
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 =3D float]: variable length array cannot be formed during template argume=
nt
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >=3D 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=3Dc++11 -c
c++test.cpp=20
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 =3D float]: variable length array cannot be formed during template argume=
nt
deduction
    inline U mmm(U data[(1U<<IntBits)+1], unsigned int mask) const {
             ^         ~
c++test.cpp:10:28: warning: shift count >=3D 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=3Dyes because of this.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258079-227>