1// PR c++/53756
2// { dg-do compile { target c++14 } }
3// { dg-options "-g -dA -fno-debug-types-section" }
4// We're looking for something like
5
6// .uleb128 0x3    # (DIE (0x33) DW_TAG_subprogram)
7// .ascii "a1\0"   # DW_AT_name
8// .long   0x4c    # DW_AT_type
9//...
10// .uleb128 0x5    # (DIE (0x4c) DW_TAG_unspecified_type)
11// .long   .LASF6  # DW_AT_name: "auto"
12//...
13// .uleb128 0x7    # (DIE (0x57) DW_TAG_subprogram)
14// .long   0x33    # DW_AT_specification
15// .long   0x87    # DW_AT_type
16//...
17// .uleb128 0x9    # (DIE (0x87) DW_TAG_base_type)
18// .ascii "int\0"  # DW_AT_name
19
20// { dg-final { scan-assembler "a1.*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\1. DW_TAG_unspecified_type.*DW_AT_specification\[\n\r]{1,2}\[^\n\r]*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\2. DW_TAG_base_type" } }
21
22struct A
23{
24  auto a1 () { return 42; }
25};
26
27int main()
28{
29  A a;
30  a.a1();
31}
32