1 // PR c++/60184 2 // { dg-do compile { target c++11 } } 3 4 union Test1 { 5 static int kConstant; 6 }; 7 8 union Test2 { 9 static const int kConstant; 10 }; 11 12 const int Test2::kConstant = 10; 13 14 union Test3 { 15 int& kConstant; // { dg-error "may not have reference type" } 16 }; 17 18 union Test4 { 19 const int& kConstant = 10; // { dg-error "may not have reference type" } 20 }; 21