| 1 |
// Test of 'using enum' debug info. |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
// { dg-options "-g -dA" } |
| 4 |
|
| 5 |
struct A |
| 6 |
{ |
| 7 |
// All the counts are +1 for the abbreviation table. |
| 8 |
// { dg-final { scan-assembler-times "DW_TAG_enumeration_type" 2 } } |
| 9 |
// { dg-final { scan-assembler-times "DW_TAG_enumerator" 3 } } |
| 10 |
enum E { e, f }; |
| 11 |
}; |
| 12 |
|
| 13 |
struct B |
| 14 |
{ |
| 15 |
// The using-enum-declaration is represented by two |
| 16 |
// DW_TAG_imported_declaration, one for each enumerator. |
| 17 |
// { dg-final { scan-assembler-times "DW_TAG_imported_declaration" 3 } } |
| 18 |
using enum A::E; |
| 19 |
}; |
| 20 |
|
| 21 |
B b; |