Bug 21590 - [3.4 only] FAIL: gcc.dg/sibcall-1.c and FAIL: gcc.dg/sibcall-2.c
Summary: [3.4 only] FAIL: gcc.dg/sibcall-1.c and FAIL: gcc.dg/sibcall-2.c
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: 3.4.6
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2005-05-15 19:00 UTC by John David Anglin
Modified: 2006-02-28 10:17 UTC (History)
2 users (show)

See Also:
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2005-10-24 03:16:31


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-05-15 19:00:02 UTC
Executing on host: /xxx/gnu/gcc-3.3/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.3/objdir/gc
c/ /xxx/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.dg/sibcall-1.c   -O2 -foptimize-siblin
g-calls  -lm   -o ./sibcall-1.exe    (timeout = 300)
PASS: gcc.dg/sibcall-1.c (test for excess errors)
Setting LD_LIBRARY_PATH to :/opt/gnu64/gcc/gcc-4.0.0/lib
FAIL: gcc.dg/sibcall-1.c execution test
Executing on host: /xxx/gnu/gcc-3.3/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.3/objdir/gc
c/ /xxx/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.dg/sibcall-2.c   -O2 -foptimize-siblin
g-calls  -lm   -o ./sibcall-2.exe    (timeout = 300)
PASS: gcc.dg/sibcall-2.c (test for excess errors)
Setting LD_LIBRARY_PATH to :/opt/gnu64/gcc/gcc-4.0.0/lib
FAIL: gcc.dg/sibcall-2.c execution test

This bug is fixed in 4.0.  These optimizations fail because the argument
pointer needs to be copied on this target.
Comment 1 Andrew Pinski 2005-10-24 03:16:31 UTC
Confirmed.
Comment 2 Gabriel Dos Reis 2005-11-21 02:29:20 UTC
Is there any hppa maintainer lookin at this?
Comment 3 Gabriel Dos Reis 2005-11-21 02:30:06 UTC
Postponed untill GCC 3.4.6
Comment 4 dave 2005-11-21 03:09:55 UTC
Subject: Re:  [3.4 only] FAIL: gcc.dg/sibcall-1.c and FAIL: gcc.dg/sibcall-2.c

> ------- Comment #2 from gdr at gcc dot gnu dot org  2005-11-21 02:29 -------
> Is there any hppa maintainer lookin at this?

Not really.  It's somewhat low priority as it's only a missed optimisation.

Although it's listed as a target bug, the fix for this problem in 4.x
was actually to the generic code.  The root cause of this bug is the fact
that the argument pointer can't be eliminated on this target.  The copy
in function.c prevents this optimisation.  It would take some research
to find the change which fixed the problem in 4.0.

It's possible to get these tests to pass if we change the argument pointer
register to a callee saves register.  However, this requires creating a
frame, saving the register used for the argument pointer and copying the
incoming argument pointer to this new register.  We could optimise this
in cases where the argument pointer isn't needed.  However, changes are
needed to reload for this.  Thus, I don't think a fix along these lines
is appropriate for 3.3.

The issue in this PR is related to the problem noted in PR 2493.  We
need to copy or save the argument pointer in order to be able to find
saved arguments.

Dave
Comment 5 Gabriel Dos Reis 2006-02-28 10:17:11 UTC
won't fix for 3.4.6