-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:
parent
4f660b159f
commit
60a9bb6172
@ -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.
|
||||
|
21
gcc/testsuite/gcc.dg/fuse-caller-save.c
Normal file
21
gcc/testsuite/gcc.dg/fuse-caller-save.c
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user