Richard Henderson writes:
 > On 11/23/2011 06:46 AM, Mikael Pettersson wrote:
 > > +FAIL: c-c++-common/gomp/atomic-10.c scan-tree-dump-times ompexp 
 > > "__atomic_fetch_add" 4
 > > +FAIL: c-c++-common/gomp/atomic-3.c scan-tree-dump-times ompexp "xyzzy, 4" 
 > > 1
 > > +FAIL: c-c++-common/gomp/atomic-9.c scan-tree-dump-times ompexp 
 > > "__atomic_fetch_add" 1
 > 
 > What are these failures?

Executing on host: /mnt/scratch/objdir47/gcc/xgcc -B/mnt/scratch/objdir47/gcc/ 
/mnt/scratch/gcc-4.7-20111112/gcc/testsuite/c-c++-common/gomp/atomic-9.c    
-fopenmp -fdump-tree-ompexp -S  -o atomic-9.s    (timeout = 300)
PASS: c-c++-common/gomp/atomic-9.c (test for excess errors)
FAIL: c-c++-common/gomp/atomic-9.c scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1

The test case expects

  #pragma omp atomic
    *bar() += 1;

to become __atomic_fetch_add (it does on x86_64), but on m68k-linux with your
patch the assignment is instead bracketed by 
__builtin_GOMP_atomic_{start,end}().

atomic-10.c and atomic-3.c are the same issue.

 > Are they fixed if you add m68k-linux to check_effective_target_sync_int_long 
 > and check_effective_target_sync_char_short in 
 > gcc/testsuite/lib/target-supports.exp?

No.  These tests require cas_int, and the patched gcc does provide that.
I believe the real error is that gomp for some reason doesn't think the target
has gcc atomics, and the tests fail in that case.

/Mikael

Reply via email to