diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C new file mode 100644 index 00000000000..3a43d9fa571 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C @@ -0,0 +1,16 @@ +// Contributed by Dodji Seketeli <dodji@redhat.com> +// origin PR debug/30161 +// { dg-options "-g -dA" } +// { dg-do compile } +// { dg-final { scan-assembler "DW_TAG_template_type_param" } } +// { dg-final { scan-assembler "U.*DW_AT_name" } } + +template <class U> +U +func(U m) +{ + return m; +} + +int i = func<int>(2); + |