re PR target/64461 (bad assembly generated for Coldfire targets)
authorJeff Law <law@redhat.com>
Mon, 12 Jan 2015 20:19:57 +0000 (13:19 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 12 Jan 2015 20:19:57 +0000 (13:19 -0700)
       PR target/64461
        * gcc.target/m68k/pr64461.c: New test.

From-SVN: r219488

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/m68k/pr64461.c [new file with mode: 0644]

index 3c267d8c8c82bfa334bf296999367bd1b2c50b5c..3ee00be251cec0945c7bc3165c33e62432dedfbe 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-12  Jeff Law  <law@redhat.com>
+
+       PR target/64461
+       * gcc.target/m68k/pr64461.c: New test.
+
 2015-01-12  David Malcolm  <dmalcolm@redhat.com>
 
        * jit.dg/test-array-as-pointer.c (create_code): Update call
diff --git a/gcc/testsuite/gcc.target/m68k/pr64461.c b/gcc/testsuite/gcc.target/m68k/pr64461.c
new file mode 100644 (file)
index 0000000..dd70355
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do assemble } */
+/* { dg-options "-mcpu=5235 -Os" } */
+
+typedef struct rtems_rfs_block_map_s
+{
+  long unsigned int blocks[(5)];
+} rtems_rfs_block_map;
+
+extern int foo (void);
+
+int
+rtems_rfs_block_map_indirect_alloc (rtems_rfs_block_map *map,
+                                   unsigned char* buffer, int b)
+{
+  (buffer + b * 4)[3] = (unsigned char) map->blocks[b];
+}