https://sourceware.org/bugzilla/show_bug.cgi?id=35048

            Bug ID: 35048
           Summary: aarch64: gas internal error in fix_insn for
                    ldapur/stlur with a forward-defined offset
           Product: binutils
           Version: 2.47
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: mumumu0722 at gmail dot com
  Target Milestone: ---

An RCPC2 load/store (ldapur, stlur, ...) whose offset is a symbol defined
later with .equ makes gas fail with an internal error in fix_insn.

$ cat aarch64-gas-ldapur-forward-equ.s
        ldapur x0, [x1, N]
        .equ N, 8

$ aarch64-linux-gnu-as --version
GNU assembler (GNU Binutils) 2.47.50.20261122
$ aarch64-linux-gnu-as -march=armv8.4-a aarch64-gas-ldapur-forward-equ.s -o
aarch64-gas-ldapur-forward-equ.o
aarch64-gas-ldapur-forward-equ.s: Assembler messages:
aarch64-gas-ldapur-forward-equ.s: Internal error in fix_insn at
/src/binutils/gas/config/tc-aarch64.c:9894.
Please report this bug.


Expected: the offset is filled in (ldapur x0, [x1, #8]), as gas does when
.equ comes first or for ldur:

        .equ N, 8
        ldapur x0, [x1, N]      ->  d9408020  ldapur x0, [x1, #8]

        ldur x0, [x1, N]
        .equ N, 8               ->  f8408020  ldur x0, [x1, #8]

Godbolt: https://godbolt.org/z/Kdxvx8Khv

This issue is found by fuzzing/automated testing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to