https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112789
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to gnzlbg from comment #6) > Thanks for all the quick feedback! > > > Also clang does not even document __builtin_ctzs anywhere ... > > This builtin is documented in the list of clang bultins. You can find it by > using CTRL+F for the builtin, in that list, > https://clang.llvm.org/docs/LanguageExtensions.html, which is the first link > that Google reveals when searching for this exact builtin. Hope that helps. Look at that part where __builtin_ctzs is mentioned there. It just says it is valid inside a constexpr and nothing else about the builtin. >There is an HPC QCD app that was developed mostly using clang, and for which >we can't apply source code modifications, that we'd like to compile which GCC >as is, but currently doesn't due to this issue. Sounds like that HPC QCD app is broken. You should report it to the developers. Also since __builtin_ctzg is added, adding __builtin_ctzs really does not make any sense since it would just done as `#define __builtin_ctzs __builtin_ctzg((unsigned short)a)` in the source.