blob: 966a824b3c21a78365e0e7f9b8f851afee993ead (
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
|
/* PR inline-asm/11676 */
/* { dg-do run } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2" } */
extern void abort (void);
static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
static int __attribute__((regparm(1), noinline, used))
bar(int x)
{
if (x != 0)
abort ();
}
static int __attribute__((regparm(1), noinline))
foo(int x)
{
x = 0;
__asm__ __volatile__("call bar" : "=a"(x) : "a"(x));
}
int main()
{
foo(1);
return 0;
}
|