summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/packed10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/packed10.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/packed10.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/packed10.C b/gcc/testsuite/g++.dg/ext/packed10.C
new file mode 100644
index 000000000..c4bbb1462
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/packed10.C
@@ -0,0 +1,14 @@
+// PR c++/13983, c++/17519
+// The typedef and the array were causing us to miss that A<int> is
+// a packed type.
+
+template <class T>
+struct A {
+ A();
+} __attribute__((packed));
+
+typedef A<int> Ai;
+
+struct B {
+ Ai a[2];
+} __attribute__((packed));