[llvm-bugs] [Bug 38496] New: error: immediate must be an integer in range [0, 65535].

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 9 00:43:12 PDT 2018


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

            Bug ID: 38496
           Summary: error: immediate must be an integer in range [0,
                    65535].
           Product: libraries
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: fj8765ah at aa.jp.fujitsu.com
                CC: llvm-bugs at lists.llvm.org

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
                    ^

-- 
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/20180809/07c4be68/attachment.html>


More information about the llvm-bugs mailing list