https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100766
Bug ID: 100766
Summary: Template type deduction fails with vector extensions
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: chris.a.ferguson at gmail dot com
Target Milestone: ---
The following is a minimum example that fails to compile with GCC, but succeeds
with Clang and Intel compilers.
template <typename T>
using vec __attribute__((__vector_size__(32))) = T;
template <typename T>
vec<T> increment(vec<T> x)
{
return x + 1;
}
vec<int> test_works(vec<int> x)
{
return increment<int>(x);
}
vec<int> test_fails(vec<int> x)
{
return increment(x);
}