aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c
new file mode 100644
index 000000000..ae3eb83fa
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36154.c
@@ -0,0 +1,11 @@
+struct eth_test_pkt {
+ unsigned short len;
+ unsigned short ctr;
+ unsigned char packet[];
+} __attribute__ ((packed));
+struct eth_test_pkt pkt_unaligned = { .packet = { 0xFC } };
+int cmd_unaligned(const void *p)
+{
+ return memcmp(p, pkt_unaligned.packet, 1);
+}
+