OSDN Git Service

Fix PR target/50099
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / asm-es-1.c
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3
4 static inline void __attribute__((always_inline))
5 f1 (void)
6 {
7   long unused;
8   asm volatile ("" : "=es" (unused) :: "memory");
9 }
10
11 static void __attribute__((noinline))
12 f2 (long *val)
13 {
14   *val = 0x1234;
15 }
16
17 static long __attribute__((noinline))
18 test (void)
19 {
20   f1 ();
21   {
22     long val;
23     f2 (&val);
24     return val;
25   }
26 }
27
28 int
29 main (void)
30 {
31   return test () != 0x1234;
32 }