[LLVMbugs] [Bug 23985] New: assertion failure when determining c11 _Atomic struct layout

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 29 11:38:51 PDT 2015


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

            Bug ID: 23985
           Summary: assertion failure when determining c11 _Atomic struct
                    layout
           Product: clang
           Version: 3.6
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: michael.b.bassett at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14531
  --> https://llvm.org/bugs/attachment.cgi?id=14531&action=edit
original source file as well of post-cpp source and clang invocation

Received an assertion failure when attempting to compile the bug_case.c
(attached):

Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is
unsized!"), function getTypeSizeInBits, file
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/llvm-3.6.1.src/include/llvm/IR/DataLayout.h,
line 500.

A more complicated variant of this case arose when attempting to construct a
struct holding a pointer and a counter in order to cope with the ABA problem
when implementing a lock-free queue. This construct will arise in many atomic
containers composed of linked elements. A workaround is to use a void pointer
in struct ptr instead of a pointer to the linked type.

This bug is not present in clang-3.5 but is in clang-3.6.1. This same behavior
is exhibited as of clang-3.7 (trunk 239386).

-- 
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/20150629/548ea456/attachment.html>


More information about the llvm-bugs mailing list