public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ghazi@caip.rutgers.edu
To: gcc-gnats@gcc.gnu.org
Cc: 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
Date: Sat, 26 Oct 2002 09:46:00 -0000	[thread overview]
Message-ID: <20021026164159.21580.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-10-26 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-26  9:46 ghazi [this message]
2002-10-28 11:16 Joe Buck
2002-10-28 16:36 Kaveh R. Ghazi
2002-10-28 19:06 Joe Buck
2002-10-29  9:56 Joe Buck
2003-03-08 11:53 target/8366: [sparc-sun-solaris2.7] " ebotcazou
2003-03-21 11:36 ebotcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021026164159.21580.qmail@sources.redhat.com \
    --to=ghazi@caip.rutgers.edu \
    --cc=davem@redhat.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=mark@codesourcery.com \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).