Clang fails with "UNREACHABLE executed" with attribute((align_value( ))) in a template (original) (raw)

Bugzilla Link 26238
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@hfinkel,@zygoloid

Extended Description

==========Environment================
OS: Linux
version: trunk
Lang: C++

=========How to reproduce============
template
void f(T attribute((align_value(4))) x) {}

int main() {
f(0);
return 0;
}

$ clang -c test.cpp

=========Error======================
Unexpected attribute kind!
UNREACHABLE executed at ***/llvm/tools/clang/include/clang/AST/AttrImpl.inc:6785!

=========Note=======================
Everything is OK if attribute is applied to a pointer type (with T * attribute or f<int *>(0))

===================
Intel Compiler Engineer
Andrey Kuleshov