summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attrib12.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/attrib12.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib12.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attrib12.C b/gcc/testsuite/g++.dg/ext/attrib12.C
new file mode 100644
index 000000000..aea93781d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib12.C
@@ -0,0 +1,16 @@
+// PR c++/13791
+
+template <typename T> struct O {
+ struct __attribute__((packed)) I {
+ int i;
+ char c;
+ };
+
+ I* foo();
+};
+
+template <typename T>
+typename O<T>::I*
+O<T>::foo() { return 0; }
+
+template class O<int>;