1 /* The RTL loop optimizer used to replace the output register of the
2 inline assembly with a pseudo although the variable is declared as
6 /* { dg-options "-O2 -Wno-attributes" } */
8 extern void abort (void);
10 static unsigned char __attribute__ ((always_inline
))
11 mytoupper (unsigned char c
)
13 if (c
>= 'a' && c
<= 'z')
18 static unsigned long __attribute__ ((always_inline
))
19 strlen (const char *s
)
21 register unsigned long r0
asm ("0");
32 : "=d" (r0
), "+a" (tmp
)
35 return r0
- (unsigned long) s
;
38 char boot_command_line
[] = "this is a test";
40 void __attribute__ ((noinline
))
43 if (strcmp (str
, "THIS IS A TEST") != 0)
50 char upper_command_line
[1024];
53 for (i
= 0; i
< strlen (boot_command_line
); i
++)
54 upper_command_line
[i
] = mytoupper (boot_command_line
[i
]);
56 upper_command_line
[strlen (boot_command_line
)] = 0;
57 foo (upper_command_line
);