| 1 |
// PR c++/79900 - ICE in strip_typedefs |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-Wpadded" } |
| 4 |
|
| 5 |
template <class> struct A; |
| 6 |
template <typename> struct B { // { dg-warning "padding struct size to alignment boundary" "" { target { ! default_packed } } } |
| 7 |
long long _M_off; |
| 8 |
char _M_state; |
| 9 |
}; |
| 10 |
template <> struct A<char> { typedef B<int> pos_type; }; |
| 11 |
enum _Ios_Openmode {}; |
| 12 |
struct C { |
| 13 |
typedef _Ios_Openmode openmode; |
| 14 |
}; |
| 15 |
template <typename, typename _Traits> struct D { |
| 16 |
typedef typename _Traits::pos_type pos_type; |
| 17 |
pos_type m_fn1(pos_type, C::openmode); |
| 18 |
}; |
| 19 |
template class D<char, A<char> >; |
| 20 |
template <typename _CharT, typename _Traits> |
| 21 |
typename D<_CharT, _Traits>::pos_type D<_CharT, _Traits>::m_fn1(pos_type x, |
| 22 |
C::openmode) { return x; } |