This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/60191] New: test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on ARMv7


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60191

            Bug ID: 60191
           Summary: test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on
                    ARMv7
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

This test case fails only with -O0, that's interesting.

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ed/gnu/arm-linux-gnueabihf/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.9.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: ../gcc-4.9-20140209/configure
--prefix=/home/ed/gnu/arm-linux-gnueabihf
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go --with-arch=armv7-a
--with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
Thread model: posix
gcc version 4.9.0 20140209 (experimental) (GCC)

Debuging the first test case shows this:
The following function gets called:

(gdb) disass make_real
Dump of assembler code for function __m_MOD_make_real:
   0x000086d8 <+0>:    push    {r11}        ; (str r11, [sp, #-4]!)
   0x000086dc <+4>:    add    r11, sp, #0
   0x000086e0 <+8>:    sub    sp, sp, #20
   0x000086e4 <+12>:    str    r0, [r11, #-16]
   0x000086e8 <+16>:    ldr    r3, [r11, #-16]
   0x000086ec <+20>:    ldr    r3, [r3]
   0x000086f0 <+24>:    ldr    r3, [r3]
   0x000086f4 <+28>:    vmov    s15, r3
   0x000086f8 <+32>:    vcvt.f32.s32    s15, s15
   0x000086fc <+36>:    vstr    s15, [r11, #-8]
   0x00008700 <+40>:    ldr    r3, [r11, #-8]
   0x00008704 <+44>:    vmov    s15, r3
   0x00008708 <+48>:    vmov.f32    s0, s15
   0x0000870c <+52>:    sub    sp, r11, #0
   0x00008710 <+56>:    pop    {r11}        ; (ldr r11, [sp], #4)
   0x00008714 <+60>:    bx    lr

the result is returned in register s0 (42.0)
but the caller expects it in register r0.

   0x00008754 <+0>:    push    {r11, lr}
   0x00008758 <+4>:    add    r11, sp, #4
   0x0000875c <+8>:    sub    sp, sp, #8
   0x00008760 <+12>:    movw    r3, #35292    ; 0x89dc
   0x00008764 <+16>:    movt    r3, #0
   0x00008768 <+20>:    str    r3, [r11, #-8]
   0x0000876c <+24>:    movw    r3, #3032    ; 0xbd8
   0x00008770 <+28>:    movt    r3, #1
   0x00008774 <+32>:    str    r3, [r11, #-12]
   0x00008778 <+36>:    ldr    r3, [r11, #-8]
   0x0000877c <+40>:    ldr    r3, [r3, #32]
   0x00008780 <+44>:    sub    r2, r11, #12
   0x00008784 <+48>:    mov    r0, r2
   0x00008788 <+52>:    blx    r3
   0x0000878c <+56>:    vmov    s14, r0
=> 0x00008790 <+60>:    vldr    s15, [pc, #400]    ; 0x8928 <MAIN__+468>
   0x00008794 <+64>:    vcmp.f32    s14, s15
   0x00008798 <+68>:    vmrs    APSR_nzcv, fpscr
   0x0000879c <+72>:    beq    0x87a4 <MAIN__+80>
   0x000087a0 <+76>:    bl    0x8428 <_gfortran_abort>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]