No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / tree-ssa / asm-3.c
blobfdcddb7a5fab2a4d3718d5be69c39c2a023c063c
1 /* PR 17739 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 #ifdef __hppa__
6 #define REGISTER "1"
7 #else
8 #define REGISTER "0"
9 #endif
11 static inline int source(void)
13 register int hardreg __asm__(REGISTER);
14 asm("" : "=r"(hardreg));
15 return hardreg;
18 void test(void)
20 int t = source();
21 foo(t);
22 bar(t);
25 /* Hardreg should appear exactly 3 times -- declaration, asm stmt,
26 and copy out. */
27 /* { dg-final { scan-tree-dump-times "hardreg" 3 "optimized" } } */
29 /* In particular, hardreg should *not* appear in the call to bar. */
30 /* { dg-final { scan-tree-dump-times "bar \[(\]t\[)\]" 1 "optimized" } } */
32 /* { dg-final { cleanup-tree-dump "optimized" } } */