summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr53970.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/torture/pr53970.C')
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53970.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/torture/pr53970.C b/gcc/testsuite/g++.dg/torture/pr53970.C
new file mode 100644
index 00000000000..53cbc1f855a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53970.C
@@ -0,0 +1,17 @@
+// { dg-do run }
+
+#pragma pack(1)
+struct mystruct {
+ char c;
+ unsigned long l[1024];
+};
+#pragma pack()
+
+int main(int argc, char **argv)
+{
+ mystruct *a = new mystruct;
+ unsigned long i;
+ for (i = 0; i < 1024; ++i)
+ a->l[i] = 0xdeadbeaf;
+ return 0;
+}