1 // { dg-do compile { target c++11 } }
3 template<typename T> struct S1
5 enum E : int; // { dg-message "previous definition" }
6 enum E : T; // { dg-error "different underlying type" }
8 template struct S1<int>; //ok
10 template<typename T> struct S2
12 enum E : int; // { dg-message "previous definition" }
13 enum E : T; // { dg-error "different underlying type" }
15 template struct S2<short>;
17 template<typename T> struct S3
19 enum E : int; // { dg-message "previous definition" }
20 enum E : short; // { dg-error "different underlying type" }