From 351f160060e5e08b2ea98f0e1faddd28d8f4b081 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 12 Jan 2015 13:19:57 -0700 Subject: [PATCH] re PR target/64461 (bad assembly generated for Coldfire targets) PR target/64461 * gcc.target/m68k/pr64461.c: New test. From-SVN: r219488 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/m68k/pr64461.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.target/m68k/pr64461.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3c267d8c8c8..3ee00be251c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-12 Jeff Law + + PR target/64461 + * gcc.target/m68k/pr64461.c: New test. + 2015-01-12 David Malcolm * 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 index 00000000000..dd70355f5fc --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/pr64461.c @@ -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]; +} -- 2.30.2