<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 - error: immediate must be an integer in range [0, 65535]."
   href="https://bugs.llvm.org/show_bug.cgi?id=38496">38496</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error: immediate must be an integer in range [0, 65535].
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>fj8765ah@aa.jp.fujitsu.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After creating the assembler file, passing it to clang causes a compilation
error.
On the other hand, compiling without creating an assembly will terminate
normally.

The following is a test program.

------------ a.c ------------
#include <stdio.h>

#pragma weak foo=bar

void bar()
{
   puts("OK");
}

int main()
{
  foo();
  return 0;
}
-------------------------------

% clang -mcmodel=large ./a.c
% ./a.out
OK
% clang -mcmodel=large ./a.c -S
% clang ./a.s
./a.s:10:11: error: immediate must be an integer in range [0, 65535].
        movz    x8, #:abs_g0_nc:.L.str
                    ^
./a.s:30:11: error: immediate must be an integer in range [0, 65535].
        movz    x8, #:abs_g0_nc:foo
                    ^</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>