From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16810 invoked by alias); 14 Feb 2014 08:39:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16788 invoked by uid 48); 14 Feb 2014 08:38:56 -0000 From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60191] New: test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on ARMv7 Date: Fri, 14 Feb 2014 08:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg01284.txt.bz2 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 0x00008794 <+64>: vcmp.f32 s14, s15 0x00008798 <+68>: vmrs APSR_nzcv, fpscr 0x0000879c <+72>: beq 0x87a4 0x000087a0 <+76>: bl 0x8428 <_gfortran_abort>