summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C
blob: 4c72490351b88f5823cec769fa5fcf36c9f1fca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
// { dg-options "-g -dA -gno-strict-dwarf -fno-merge-debug-strings" }
// { dg-final { scan-assembler "DW_TAG_template_value_param" } }
// { dg-final { scan-assembler "f.*DW_AT_name" } }
// { dg-final { scan-assembler "DW_AT_location\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_addr\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*_Z4blehv\[^\\r\\n\]*\[\\r\\n\]*\[^\\r\\n\]*DW_OP_stack_value" } } */

typedef void (*func_ptr)();

template <func_ptr f>
int
func()
{
    f();
    return 0;
}

void
bleh()
{
}

int c = func<bleh>();