diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b81a0e1d9edce530b241b6d57db0b2509538185..5d304c89026327da074000b1a7db4ea8e1fd79a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-26 Richard Henderson <rth@redhat.com> + + * omp-low.c (expand_omp_atomic): Assume anything aligned to + BIGGEST_ALIGNMENT is aligned. + 2011-11-26 Richard Henderson <rth@redhat.com> * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index a4bfb8413fe9ce151f61488ed8e3ae6d9859dd7a..4e1c2badae35738faf55fc631abf952174cea743 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -5501,7 +5501,9 @@ expand_omp_atomic (struct omp_region *region) unsigned int align = TYPE_ALIGN_UNIT (type); /* __sync builtins require strict data alignment. */ - if (exact_log2 (align) >= index) + /* ??? Assume BIGGEST_ALIGNMENT *is* aligned. */ + if (exact_log2 (align) >= index + || align * BITS_PER_UNIT >= BIGGEST_ALIGNMENT) { /* Atomic load. */ if (loaded_val == stored_val