[Bug target/87391] [RISCV] -march=rv32i -mabi=ilp32e is erroneously accepted

asb at lowrisc dot org gcc-bugzilla@gcc.gnu.org
Sat Sep 22 15:10:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87391

--- Comment #1 from Alex Bradbury <asb at lowrisc dot org> ---
Apologies I pasted the wrong command output in the original report. The
invocation demonstrating the bug is below:

$ ./riscv32-unknown-elf-gcc -march=rv32i -mabi=ilp32e foo.c -S -o -
        .file   "foo.c"
        .option nopic
        .text
        .align  2
        .globl  bar
        .type   bar, @function
bar:
        addi    sp,sp,-16
        sw      ra,12(sp)
        sw      s0,8(sp)
        addi    s0,sp,16
        li      a6,7
        li      a5,6
        li      a4,5
        li      a3,4
        li      a2,3
        li      a1,2
        li      a0,1
        call    foo
        mv      a5,a0
        mv      a0,a5
        lw      ra,12(sp)
        lw      s0,8(sp)
        addi    sp,sp,16
        jr      ra
        .size   bar, .-bar
        .ident  "GCC: (GNU) 9.0.0 20180922 (experimental)"


More information about the Gcc-bugs mailing list