<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang asserts when total size of static variables exceeds the address space"
   href="https://bugs.llvm.org/show_bug.cgi?id=35267">35267</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang asserts when total size of static variables exceeds the address space
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ch3root@openwall.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Source code:

----------------------------------------------------------------------
int main(void)
{
  static char a[-1u / 2];
  static char b[-1u / 2];
  static char c[3];

  a[0] = 1;
  b[0] = 1;
  c[2] = 1;
}
----------------------------------------------------------------------

Results:

----------------------------------------------------------------------
$ clang -std=c11 -m32 test.c
clang-6.0:
/path/to/clang/sources/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:123:
virtual void {anonymous}::X86AsmBackend::applyFixup(const llvm::MCAssembler&,
const llvm::MCFixup&, const llvm::MCValue&, llvm::MutableArrayRef<char>,
uint64_t, bool) const: Assertion `isIntN(Size * 8 + 1, Value) && "Value does
not fit in the Fixup field"' failed.
[etc.]
----------------------------------------------------------------------

clang x86-64 version: clang version 6.0.0 (trunk 317827)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>