This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/2893: sparc-sun-solaris2.7 -fpic/-fPIC -O regression on compile/20000518-1.c
- To: gcc-gnats at gcc dot gnu dot org
- Subject: optimization/2893: sparc-sun-solaris2.7 -fpic/-fPIC -O regression on compile/20000518-1.c
- From: ghazi at caip dot rutgers dot edu
- Date: 22 May 2001 02:47:46 -0000
- Reply-To: ghazi at caip dot rutgers dot edu
>Number: 2893
>Category: optimization
>Synopsis: sparc-sun-solaris2.7 -fpic/-fPIC -O regression on compile/20000518-1.c
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 21 19:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Kaveh Ghazi
>Release: 3.0 20010521 (prerelease)
>Organization:
>Environment:
sparc-sun-solaris2.7
>Description:
Testsuite entry compile/20000518-1.c fails with -fpic/-fPIC
and any optimization level. It worked less than a week ago
on both the trunk and branch and now fails on both.
I.e. it's a regression.
Running target unix/-fPIC
FAIL: gcc.c-torture/compile/20000518-1.c, -O1
FAIL: gcc.c-torture/compile/20000518-1.c, -O2
FAIL: gcc.c-torture/compile/20000518-1.c, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/compile/20000518-1.c, -O3 -g
FAIL: gcc.c-torture/compile/20000518-1.c, -Os
The logfile shows it's an error from the native assembler:
/usr/ccs/bin/as: "/tmp/cccGcQmd.s", line 17: error: can't compute value of an expression involving an external symbol
/usr/ccs/bin/as: "/tmp/cccGcQmd.s", line 18: error: can't compute value of an expression involving an external symbol
here's the .s file generated with -fPIC -O -c --save-temps
-----------------------
.file "20000518-1.i"
.section ".text"
.align 4
.LLGETPC0:
retl
add %o7, %l7, %l7
.align 4
.global dotest
.type dotest,#function
.proc 020
dotest:
!#PROLOGUE# 0
save %sp, -112, %sp
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
call .LLGETPC0
add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
sethi %hi(_GLOBAL_OFFSET_TABLE_-(.LL5-.)), %o0
or %o0, %lo(_GLOBAL_OFFSET_TABLE_-(.LL5-.)), %o0
call callit1, 0
sub %l7, %o0, %o0
.LL4:
ret
restore
.LLfe1:
.size dotest,.LLfe1-dotest
.ident "GCC: (GNU) 3.0 20010521 (prerelease)"
---------------------
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: