From 8f1ed0e574aaab0cca1952790d66ae6aaa0dc839 Mon Sep 17 00:00:00 2001 From: krebbel Date: Fri, 7 Feb 2014 14:21:29 +0000 Subject: [PATCH] 2014-02-07 Andreas Krebbel * gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte variable used for atomic operations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207600 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e12145..e1ccc2d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-02-07 Andreas Krebbel + + * gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte + variable used for atomic operations. + 2014-02-07 Richard Biener PR middle-end/60092 diff --git a/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c b/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c index faed818..5affeba 100644 --- a/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c +++ b/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c @@ -40,10 +40,12 @@ void f8() #endif } +/* aligned (16): On S/390 16 byte compare and swap operations are only + available if the memory operand resides on a 16 byte boundary. */ void f16() { #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 - typedef int __attribute__ ((__mode__ (__TI__))) ti_int_type; + typedef int __attribute__ ((__mode__ (__TI__), aligned (16))) ti_int_type; ti_int_type ti_int; __sync_bool_compare_and_swap (&ti_int, (ti_int_type)0, (ti_int_type)1); #endif -- 2.7.4