[Bug 258079] clang-11 fails: candidate template ignored: substitution failure [with U = float]: variable length array cannot be formed during template argument deduction
Date: Fri, 27 Aug 2021 09:34:22 UTC
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@FreeBSD.org Reporter: yuri@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@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.