[llvm-bugs] [Bug 37654] New: ARM assembler calculates indeterminate value for expression with addresses

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 1 12:44:29 PDT 2018


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

            Bug ID: 37654
           Summary: ARM assembler calculates indeterminate value for
                    expression with addresses
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrey.vihrov at gmail.com
                CC: llvm-bugs at lists.llvm.org

Assembling the following source:

    .text
    .thumb
    subs r0, #(.-.+1)

with "clang -fintegrated-as -target armv7-none-linux-androideabi16 -c x.s"
produces, for example,

00000000 <.text>:
   0:   38cb            subs    r0, #203        ; 0xcb

where the immediate value varies with each run.

This seems to affect any expression with addresses, e.g., (.-.), (.-.L0) etc.
The +1 is there just for non-zero expected output.

clang --version:
clang version 6.0.0 (tags/RELEASE_600/final)

-- 
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/20180601/0fa8ab3d/attachment.html>


More information about the llvm-bugs mailing list