diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-11-12 21:42:23 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-11-12 21:42:23 +0100 |
commit | f74dcfb70183a037feaefaa9e6d491249cbafc2f (patch) | |
tree | 02a9eb627b1ed382aec29a52010e28fa90130acd /gcc/testsuite/g++.dg | |
parent | 6375779a599735d55828634076b8a20521ec5620 (diff) | |
download | gcc-f74dcfb70183a037feaefaa9e6d491249cbafc2f.zip gcc-f74dcfb70183a037feaefaa9e6d491249cbafc2f.tar.gz gcc-f74dcfb70183a037feaefaa9e6d491249cbafc2f.tar.bz2 |
re PR c++/24761 (templates and inline-asm and "+")
PR c++/24761
* pt.c (tsubst_copy_asm_operands): New function.
(tsubst_expr) <case ASM_EXPR>: Use it.
* g++.dg/template/asm1.C: New test.
From-SVN: r106831
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/template/asm1.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/asm1.C b/gcc/testsuite/g++.dg/template/asm1.C new file mode 100644 index 0000000..741759f --- /dev/null +++ b/gcc/testsuite/g++.dg/template/asm1.C @@ -0,0 +1,14 @@ +// PR c++/24761 +// { dg-do compile } + +template <int> +int f (int i) +{ + asm ("# %0 %1" : "+r" (i)); + return i; +} + +int main () +{ + return f<0> (0) + f<1> (0); +} |