re PR target/14041 (H8300-elf unaligned word/longword access of zero initialized...
authorDhananjay Deshpande <dhananjayd@kpitcummins.com>
Mon, 28 Jun 2004 16:23:02 +0000 (16:23 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 28 Jun 2004 16:23:02 +0000 (10:23 -0600)
        PR target/14041
        * config/h8300/h8300.h (ASM_OUTPUT_ALIGNED_BSS): Define.

       PR target/14041
        * gcc.dg/h8300-bss-align-1.c : New.

From-SVN: r83797

gcc/ChangeLog
gcc/config/h8300/h8300.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/h8300-bss-align-1.c [new file with mode: 0644]

index 2058e1595637e5d6303b7ce6fff1e21c97024afa..2505195a79e4747ccb54017fd93183b23e367a8d 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-28  Dhananjay Deshpande  <dhananjayd@kpitcummins.com>
+
+       PR target/14041
+       * config/h8300/h8300.h (ASM_OUTPUT_ALIGNED_BSS): Define.
+
 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
 
        * tree.h (tree_check_failed): Make varadic.
index 67fe01f7becdd88ecbe0ddc869e9816fa03a671b..d78669babac172c1462e050368ac903631524ad1 100644 (file)
@@ -1100,6 +1100,9 @@ struct cum_arg
 #define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED)                \
   asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
 
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
+  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+
 /* This says how to output an assembler line
    to define a local common symbol.  */
 
index 2f8653e100916dca4ae87500aac65abb9bc98a17..7fca05f8ee23fb2486d1e5d8b52a8b258d21c065 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-28  Dhananjay Deshpande  <dhananjayd@kpitcummins.com>
+
+       PR target/14041
+       * gcc.dg/h8300-bss-align-1.c : New.
+
 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
 
        * PR C++/16174
diff --git a/gcc/testsuite/gcc.dg/h8300-bss-align-1.c b/gcc/testsuite/gcc.dg/h8300-bss-align-1.c
new file mode 100644 (file)
index 0000000..d6459e1
--- /dev/null
@@ -0,0 +1,12 @@
+/* Make sure that the H8 backend does align zero initialized variables. */
+/* { dg-do compile { target h8300-*-* } } */
+/* { dg-options "" } */
+
+struct s {
+  char a, b;
+  long c;
+};
+
+struct s s = {0};
+
+/* { dg-final { scan-assembler ".align" } } */