aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/20080410-1.c
blob: c398674c2aa7d0b6c6c7a3e60d98aafecf0fb485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do compile }  */
/* { dg-options "-O0" } */
/* { dg-skip-if "" { "sh*-*-*" } "-mb" "" }  */
/* { dg-final { scan-assembler-not "add\tr0,r0" } } */

/* This test checks chain reloads conflicts.  If they don't
   conflict, the same hard register R0 is used for the both reloads
   but in this case the second reload needs an intermediate register
   (which is the reload register).  As the result we have the
   following code

   	mov	#4,r0   -- first reload
	mov	r14,r0  -- second reload
	add	r0,r0   -- second reload

   The right code should be

   	mov	#4,r0   -- first reload
	mov	r14,r1  -- second reload
	add	r0,r1   -- second reload

*/

_Complex float foo_float ();

void bar_float ()
{
  __real foo_float ();
}