diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C')
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C new file mode 100644 index 0000000..7af1d91 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-9.C @@ -0,0 +1,28 @@ +// Origin PR debug/PR46973 +// { dg-options "-g -dA" } +// { dg-do compile } + +struct S +{ + int f; +}; + +template<typename T, int I, int *P, int S::*MP> +struct Base +{ + template<typename Z> + struct Inner + { + }; +}; + +int a_global; + +int main () +{ + Base<long, 47, &a_global, &S::f>::Inner<float> inner; + return 0; +} + +// { dg-final { scan-assembler-times "DIE \\(\[^\n\r\]*\\) DW_TAG_template_type_param" 2 } } +// { dg-final { scan-assembler-times "DIE \\(\[^\n\r\]*\\) DW_TAG_template_value_param" 3 } } |