-fuse-caller-save - Add test-case

2014-04-24  Radovan Obradovic  <robradovic@mips.com>
            Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/fuse-caller-save.c: New test.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r209745
This commit is contained in:
Radovan Obradovic 2014-04-24 10:27:16 +00:00 committed by Tom de Vries
parent 4f660b159f
commit 60a9bb6172
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-04-24 Radovan Obradovic <robradovic@mips.com>
Tom de Vries <tom@codesourcery.com>
* gcc.dg/fuse-caller-save.c: New test.
2014-04-24 Joey Ye <joey.ye@arm.com>
* g++.dg/cpp0x/nsdmi-union5.C: Change to runtime test.

View File

@ -0,0 +1,21 @@
/* { dg-do run } */
/* { dg-options "-fuse-caller-save" } */
/* Testing -fuse-caller-save optimization option. */
static int __attribute__((noinline))
bar (int x)
{
return x + 3;
}
int __attribute__((noinline))
foo (int y)
{
return y + bar (y);
}
int
main (void)
{
return !(foo (5) == 13);
}