1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // origin PR debug/30161
3 // { dg-options "-gdwarf-2 -dA" }
4 // { dg-do compile }
5 // { dg-final { scan-assembler "DW_TAG_template_value_param" } }
6 // { dg-final { scan-assembler "i\[^\n\r]* DW_AT_name" } }
7 // { dg-final { scan-assembler "3\[^\n\r]* DW_AT_const_value" } }
8
9
10 template <int i>
11 int
func()12 func()
13 {
14 int j = i;
15 return j;
16 }
17
18 const int foo = 1;
19 const int bar = 2;
20
21 int h = func<foo+bar>();
22
23