From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3841 invoked by alias); 26 Oct 2002 16:46:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 3730 invoked by uid 71); 26 Oct 2002 16:46:01 -0000 Resent-Date: 26 Oct 2002 16:46:01 -0000 Resent-Message-ID: <20021026164601.3729.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, rth@redhat.com, davem@redhat.com, jakub@redhat.com, mark@codesourcery.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, ghazi@caip.rutgers.edu Received: (qmail 21581 invoked by uid 61); 26 Oct 2002 16:41:59 -0000 Message-Id: <20021026164159.21580.qmail@sources.redhat.com> Date: Sat, 26 Oct 2002 09:46:00 -0000 From: ghazi@caip.rutgers.edu Reply-To: ghazi@caip.rutgers.edu To: gcc-gnats@gcc.gnu.org Cc: rth@redhat.com, davem@redhat.com, jakub@redhat.com, mark@codesourcery.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: rth@redhat.com davem@redhat.com jakub@redhat.com mark@codesourcery.com Subject: target/8366: sparc-sun-solaris2.7 C testsuite failure w/-m64 -fpic -O in execute/loop-2d.c X-SW-Source: 2002-10/txt/msg01089.txt.bz2 List-Id: >Number: 8366 >Category: target >Synopsis: sparc-sun-solaris2.7 C testsuite failure w/-m64 -fpic -O in execute/loop-2d.c >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Sat Oct 26 09:46:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Kaveh Ghazi >Release: gcc version 3.2.1 20021025 (prerelease) >Organization: >Environment: sparc-sun-solaris2.7 or sparcv9-sun-solaris2.7 >Description: I'm getting an abort with the 3.2.x prerelease on sparc-solaris2.7 running the binary from execute/loop-2d.c when compiled with -m64 -fpic -O. I also get the failure on sparcv9-solaris2.7 with just -fpic -O. The abort goes away if I remove any of those flags or change the optimization level. I've pasted the .s file in case that helps catch it by eye, it's not too long. This abort also occurs in the 3.2 release as well as the 3.1.1 release so I can't say it's a regression, however on sparcv9 it merely requires -fpic -O so I think it's worth a quick look before the next 3.2.x release if time permits and the fix is safe. .file "loop-2d.c" .section ".text" .align 4 .LLGETPC0: retl add %o7, %l7, %l7 .align 4 .global f .type f,#function .proc 04 f: !#PROLOGUE# 0 save %sp, -192, %sp sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 call .LLGETPC0 add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7 sllx %i0, 2, %i2 ldx [%l7+a], %i1 add %i2, %i1, %i2 add %i0, -1, %i1 cmp %i1, -1 be,pn %icc, .LL8 ld [%l7+a+4], %g4 .LL6: add %i2, -4, %i2 sll %i1, 1, %i0 add %i0, %i1, %i0 add %i0, %g4, %i0 add %i1, -1, %i1 cmp %i1, -1 bne,pt %icc, .LL6 st %i0, [%i2] .LL8: nop return %i7+8 nop .LLfe1: .size f,.LLfe1-f .align 4 .global main .type main,#function .proc 04 main: !#PROLOGUE# 0 save %sp, -192, %sp sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 call .LLGETPC0 add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7 ldx [%l7+a], %l0 st %g0, [%l0+4] st %g0, [%l0] call f, 0 mov 2, %o0 ld [%l0], %o1 cmp %o1, %l0 bne,pt %icc, .LL11 add %o1, 3, %o1 ld [%l0+4], %o0 cmp %o0, %o1 be,pn %icc, .LL10 nop .LL11: call abort, 0 nop .LL10: call exit, 0 mov 0, %o0 nop .LLfe2: .size main,.LLfe2-main .common a,8,4 .ident "GCC: (GNU) 3.2.1 20021025 (prerelease)" >How-To-Repeat: Compile with: cc1 -fpreprocessed loop-2d.i -mptr64 -mstack-bias -mno-v8plus -mcpu=v9 -quiet -dumpbase loop-2d.c -m64 -O -version -fpic -o loop-2d.s /usr/ccs/bin/as -V -Qy -s -K PIC -xarch=v9 -o loop-2d.o loop-2d.s collect2 -V -Y P,/usr/lib/sparcv9 -Qy /tmp/kg/321/build/gcc/sparcv9/crt1.o /tmp/kg/321/build/gcc/sparcv9/crti.o /usr/ccs/lib/sparcv9/values-Xa.o /tmp/kg/321/build/gcc/sparcv9/crtbegin.o -L/tmp/kg/321/build/gcc/sparcv9 -L/tmp/kg/321/build/gcc -L/usr/ccs/bin/sparcv9 -L/usr/ccs/bin -L/usr/ccs/lib/sparcv9 -L/usr/ccs/lib -L/lib/sparcv9 -L/usr/lib/sparcv9 loop-2d.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /tmp/kg/321/build/gcc/sparcv9/crtend.o /tmp/kg/321/build/gcc/sparcv9/crtn.o then run the binary file >Fix: >Release-Note: >Audit-Trail: >Unformatted: