From: Dhananjay Deshpande Date: Mon, 28 Jun 2004 16:23:02 +0000 (+0000) Subject: re PR target/14041 (H8300-elf unaligned word/longword access of zero initialized... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6cdd27216a75abc4d9a4b8941450e18012dad47e;p=gcc.git re PR target/14041 (H8300-elf unaligned word/longword access of zero initialized variables) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2058e159563..2505195a79e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-28 Dhananjay Deshpande + + PR target/14041 + * config/h8300/h8300.h (ASM_OUTPUT_ALIGNED_BSS): Define. + 2004-06-28 Nathan Sidwell * tree.h (tree_check_failed): Make varadic. diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 67fe01f7bec..d78669babac 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f8653e1009..7fca05f8ee2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-06-28 Dhananjay Deshpande + + PR target/14041 + * gcc.dg/h8300-bss-align-1.c : New. + 2004-06-28 Nathan Sidwell * 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 index 00000000000..d6459e15f67 --- /dev/null +++ b/gcc/testsuite/gcc.dg/h8300-bss-align-1.c @@ -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" } } */