[LLVMbugs] [Bug 17666] New: clang crashes when using 'aligned' type attribute with an argument that is not a literal constant

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 23 12:58:24 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17666

            Bug ID: 17666
           Summary: clang crashes when using 'aligned' type attribute with
                    an argument that is not a literal constant
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: st at quanttec.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The current trunk version of clang in C++11 mode reports an error for the
second static assert in the following sample (but not for the equivalent first
one) and crashes for the T3 typedef. 

int main() {
  typedef int __attribute__((__aligned__(1))) T1; // no error
  static_assert(alignof(T1) == 1, "wrong alignment");

  constexpr int A = 1;

  using T2 = int __attribute__((__aligned__(A)));
  static_assert(alignof(T2) == 1, "wrong alignment"); // error

  typedef int __attribute__((__aligned__(A))) T3; // crash
  static_assert(alignof(T3) == 1, "wrong alignment");
}

-- 
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/20131023/ad74ffee/attachment.html>


More information about the llvm-bugs mailing list