summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C
blob: b5518ef18a0975aed3c0595c1c1e7253e4981795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// { dg-options "-g -dA -gno-strict-dwarf -std=c++0x" }
// { dg-final { scan-assembler-times "DIE\[^\n\r\]*DW_TAG_enumeration_type" 3 } }
// { dg-final { scan-assembler-times " DW_AT_enum_class" 2 } }

enum A { a1, a2 } a;
enum struct B { b1, b2 } b;
enum class C { c1, c2 } c;

void
foo ()
{
  a = a1;
  a = A::a2;
  b = B::b1;
  b = B::b2;
  c = C::c1;
  c = C::c2;
}