mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-16 04:40:25 +08:00
re PR middle-end/36877 (-O0 -fopenmp -march=i386 atomics)
PR middle-end/36877 * omp-low.c (expand_omp_atomic_fetch_op): Make sure the return value of the builtin is ignored. * gcc.dg/gomp/atomic-11.c: New test. From-SVN: r137989
This commit is contained in:
parent
5e2be41f37
commit
a7ea9e2968
@ -1,3 +1,9 @@
|
||||
2008-07-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36877
|
||||
* omp-low.c (expand_omp_atomic_fetch_op): Make sure the
|
||||
return value of the builtin is ignored.
|
||||
|
||||
2008-07-19 Olivier Hainque <hainque@adacore.com>
|
||||
|
||||
* doc/tm.texi (MALLOC_ABI_ALIGNMENT): New macro. Alignment, in
|
||||
|
@ -4742,6 +4742,7 @@ expand_omp_atomic_fetch_op (basic_block load_bb,
|
||||
bsi = bsi_last (load_bb);
|
||||
gcc_assert (TREE_CODE (bsi_stmt (bsi)) == OMP_ATOMIC_LOAD);
|
||||
call = build_call_expr (decl, 2, addr, fold_convert (itype, rhs));
|
||||
call = fold_convert (void_type_node, call);
|
||||
force_gimple_operand_bsi (&bsi, call, true, NULL_TREE, true, BSI_SAME_STMT);
|
||||
bsi_remove (&bsi, true);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-07-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36877
|
||||
* gcc.dg/gomp/atomic-11.c: New test.
|
||||
|
||||
2008-07-19 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/36795
|
||||
|
17
gcc/testsuite/gcc.dg/gomp/atomic-11.c
Normal file
17
gcc/testsuite/gcc.dg/gomp/atomic-11.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* PR middle-end/36877 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fopenmp" } */
|
||||
/* { dg-options "-fopenmp -march=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
|
||||
|
||||
int i;
|
||||
float f;
|
||||
|
||||
void foo (void)
|
||||
{
|
||||
#pragma omp atomic
|
||||
i++;
|
||||
#pragma omp atomic
|
||||
f += 1.0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "__sync_(fetch|add|bool|val)" { target i?86-*-* x86_64-*-* powerpc*-*-* ia64-*-* s390*-*-* sparc*-*-* } } } */
|
Loading…
x
Reference in New Issue
Block a user