diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/sh/pr61195.c')
-rw-r--r-- | gcc/testsuite/gcc.target/sh/pr61195.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/sh/pr61195.c b/gcc/testsuite/gcc.target/sh/pr61195.c new file mode 100644 index 00000000000..f3fb10b7bf4 --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/pr61195.c @@ -0,0 +1,19 @@ +/* Verify that we don't switch mode for single moves. */ +/* { dg-do compile } */ +/* { dg-require-effective-target hard_float } */ +/* { dg-skip-if "" { *-*-* } { "mfmovd" } { "" } } */ +/* { dg-final { scan-assembler-not "fpscr" } } */ + +float *g; + +float +foo(float f) +{ + return f; +} + +float +foo1(void) +{ + return *g; +} |