OSDN Git Service

PR middle-end/29274
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / sh / 20080410-1.c
1 /* { dg-do compile { target "sh-*-*" } } */
2 /* { dg-options "-O0 -m4 -ml" } */
3 /* { dg-final { scan-assembler-not "add\tr0,r0" } } */
4
5 /* This test checks that chain reloads conflict.  I they don't
6    conflict, the same hard register R0 is used for the both reloads
7    but in this case the second reload needs an intermediate register
8    (which is the reload register).  As the result we have the
9    following code
10
11         mov     #4,r0   -- first reload
12         mov     r14,r0  -- second reload
13         add     r0,r0   -- second reload
14
15    The right code should be
16
17         mov     #4,r0   -- first reload
18         mov     r14,r1  -- second reload
19         add     r0,r1   -- second reload
20
21 */
22
23 _Complex float foo_float ();
24
25 void bar_float ()
26 {
27   __real foo_float ();
28 }