1 // { dg-do compile { target c++11 } }
2 // PR c++/13791
3 
4 template <typename T> struct O {
5   struct [[gnu::packed]] I {
6     int i;
7     char c;
8   };
9 
10   I* foo();
11 };
12 
13 template <typename T>
14 typename O<T>::I*
foo()15 O<T>::foo() { return 0; }
16 
17 template class O<int>;
18