# DP: Fix PR target/60034 (AArch64), taken from the trunk. gcc/ 2014-03-31 Kugan Vivekanandarajah PR target/60034 * aarch64/aarch64.c (aarch64_classify_address): Fix alignment for section anchor. gcc/testsuite/ 2014-03-31 Kugan Vivekanandarajah PR target/60034 * gcc.target/aarch64/pr60034.c: New file. --- a/src/gcc/testsuite/gcc.target/aarch64/pr60034.c +++ b/src/gcc/testsuite/gcc.target/aarch64/pr60034.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99 -O" } */ + +static unsigned long global_max_fast; + +void __libc_mallopt (int param_number, int value) +{ + __asm__ __volatile__ ("# %[_SDT_A21]" :: [_SDT_A21] "nor" ((global_max_fast))); + global_max_fast = 1; +} --- a/src/gcc/config/aarch64/aarch64.c +++ b/src/gcc/config/aarch64/aarch64.c @@ -3196,6 +3196,9 @@ } else if (SYMBOL_REF_DECL (sym)) align = DECL_ALIGN (SYMBOL_REF_DECL (sym)); + else if (SYMBOL_REF_HAS_BLOCK_INFO_P (sym) + && SYMBOL_REF_BLOCK (sym) != NULL) + align = SYMBOL_REF_BLOCK (sym)->alignment; else align = BITS_PER_UNIT;