diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-26 15:53:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-26 15:53:14 +0000 |
commit | 16d4da86ad326a997d75ae7a4713f4f250964883 (patch) | |
tree | 2004ca3e22c09d34da7b9b5d3effeba065873fd5 /gcc/testsuite/gcc.dg/i386-asm-1.c | |
parent | 86b042fab4995bfbcc294b9f12bc6450c7e1245b (diff) | |
download | gcc-16d4da86ad326a997d75ae7a4713f4f250964883.tar.gz |
PR inline-asm/11676
* cse.c (count_reg_usage): Handle asm_operands properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-asm-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/i386-asm-1.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-asm-1.c b/gcc/testsuite/gcc.dg/i386-asm-1.c new file mode 100644 index 00000000000..aae0de845b3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-asm-1.c @@ -0,0 +1,24 @@ +/* PR inline-asm/11676 */ +/* { dg-do run { target i?86-*-* } } */ +/* { dg-options "-O2" } */ + +static int bar(int x) __asm__("bar"); +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; +} |