diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/atomic-noinline.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/atomic-noinline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/atomic-noinline.c b/gcc/testsuite/gcc.dg/atomic-noinline.c index 06a93e0..eb0866e 100644 --- a/gcc/testsuite/gcc.dg/atomic-noinline.c +++ b/gcc/testsuite/gcc.dg/atomic-noinline.c @@ -49,6 +49,13 @@ main () if (__atomic_is_lock_free (4, 0) != 10) abort (); + /* PR 51040 was caused by arithmetic code not patching up nand_fetch properly + when used an an external function. Look for proper return value here. */ + ac = 0x3C; + bc = __atomic_nand_fetch (&ac, 0x0f, __ATOMIC_RELAXED); + if (bc != ac) + abort (); + return 0; } |