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

            Bug ID: 124262
           Summary: FAIL: gcc.dg/fold-round-1.c scan-assembler-not
                    link_error
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: azoff at gcc dot gnu.org
  Target Milestone: ---

For arm-none-eabi, this test fails due to that the __builtin_* functions are
not always implemented.

Testing gcc.dg/fold-round-1.c
doing compile
Executing on host: /build/r16-7687-g772499fd7e2f9a/bin/arm-none-eabi-gcc 
/build/gcc_src/gcc/testsuite/gcc.dg/fold-round-1.c  -mthumb -march=armv6s-m
-mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto   -fdiagnostics-plain-output 
-Ofast -ffat-lto-objects -fno-ident -S     -o fold-round-1.s    (timeout = 800)
spawn -ignore SIGHUP /build/r16-7687-g772499fd7e2f9a/bin/arm-none-eabi-gcc
/build/gcc_src/gcc/testsuite/gcc.dg/fold-round-1.c -mthumb -march=armv6s-m
-mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto -fdiagnostics-plain-output -Ofast
-ffat-lto-objects -fno-ident -S -o fold-round-1.s
pid is 47729 -47729
pid is -1
output is  status 0
PASS: gcc.dg/fold-round-1.c (test for excess errors)
FAIL: gcc.dg/fold-round-1.c scan-assembler-not link_error


The generated assembler for round_florf_1 is:
        .arch armv6s-m
        .fpu softvfp
        .eabi_attribute 23, 1
        .eabi_attribute 24, 1
        .eabi_attribute 25, 1
        .eabi_attribute 26, 1
        .eabi_attribute 30, 2
        .eabi_attribute 34, 0
        .eabi_attribute 18, 4
        .file   "fold-round-1.c"
        .text
        .align  1
        .p2align 2,,3
        .global round_floorf_1
        .syntax unified
        .code   16
        .thumb_func
        .type   round_floorf_1, %function
round_floorf_1:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        push    {r4, r5, r6, r7, lr}
        movs    r1, #252
        mov     lr, r8
        lsls    r1, r1, #22
        push    {lr}
        adds    r4, r0, #0
        bl      __aeabi_fadd
        bl      floorf
        mov     r8, r0
        adds    r0, r4, #0
        bl      floorf
        adds    r6, r0, #0
        adds    r0, r4, #0
        bl      ceilf
        adds    r1, r6, #0
        adds    r5, r0, #0
        adds    r0, r4, #0
        bl      __aeabi_fsub
        adds    r1, r4, #0
        adds    r7, r0, #0
        adds    r0, r5, #0
        bl      __aeabi_fsub
        adds    r1, r0, #0
        adds    r0, r7, #0
        bl      __aeabi_fcmplt
        cmp     r0, #0
        beq     .L2
        adds    r5, r6, #0
.L2:
        mov     r1, r8
        adds    r0, r5, #0
        bl      __aeabi_fcmpeq
        cmp     r0, #0
        beq     .L9
.L1:
        @ sp needed
        pop     {r7}
        mov     r8, r7
        pop     {r4, r5, r6, r7, pc}
.L9:
        bl      link_error
        b       .L1
        .size   round_floorf_1, .-round_floorf_1

The test case fails for Cortex-M0/3/4/7/33/55/85 in both soft and, where
applicable, hard float ABI.

Reply via email to