summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/packed11.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/packed11.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/packed11.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/packed11.C b/gcc/testsuite/g++.dg/ext/packed11.C
new file mode 100644
index 000000000..e75845d93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/packed11.C
@@ -0,0 +1,13 @@
+// PR c++/26670
+
+struct nonpod {
+ nonpod();
+};
+
+struct nonpod_pack {
+ nonpod n; // { dg-warning "ignoring packed attribute" }
+} __attribute__ ((packed));
+
+struct nonpod_pack2 {
+ nonpod_pack p; // { dg-warning "ignoring packed attribute" }
+} __attribute__ ((packed));