This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA:] Test-cases for sibling calls.
- From: Richard Henderson <rth at redhat dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Sep 2002 11:01:38 -0700
- Subject: Re: [RFA:] Test-cases for sibling calls.
- References: <Pine.BSF.4.44.0209280956550.30413-100000@dair.pair.com>
On Sat, Sep 28, 2002 at 10:01:04AM -0400, Hans-Peter Nilsson wrote:
> * gcc.dg/sibcall-1.c, gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c,
> gcc.dg/sibcall-4.c: New tests.
Ok.
Another way to have checked this is to verify that the
return address was the same. I.e.
static void f1(void) __attribute__((noinline));
static void f2(void) __attribute__((noinline));
void *ra[2];
int main()
{
f1();
if (ra[0] != ra[1])
abort();
return 0;
}
static void f1()
{
ra[0] = __builtin_return_address (0);
f2();
}
static void f2()
{
ra[1] = __builtin_return_address (0);
}
Perhaps that would work better for the targets you say
don't fail the test properly.
r~