[llvm-bugs] [Bug 26238] New: Clang fails with "UNREACHABLE executed" with __attribute__((align_value( ))) in a template

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 21 10:04:36 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26238

            Bug ID: 26238
           Summary: Clang fails with "UNREACHABLE executed" with
                    __attribute__((align_value( ))) in a template
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrey.kuleshov at intel.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

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

=========How to reproduce============
template <class T>
void f(T __attribute__((align_value(4))) x) {}

int main() {
  f<int>(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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160121/90801d54/attachment.html>


More information about the llvm-bugs mailing list