Hi, When passing an address of a local variable as the first argument of 'sync_fetch_and_add' I get an error of unrecognizable insn. For example, the test below (extracted from gcc.c-torture/compile/sync-1.c) fails on powerpc. If however, 'uc' was a global variable, the compilation passed perfectly. This scenario does not happen for ints, only for chars.
void test_op_ignore (void) { unsigned char uc; (void) __sync_fetch_and_add (&uc, 1); } Here's the failure message: error: unrecognizable insn: (insn 16 15 17 3 (parallel [ (set (reg:SI 123) (ior:SI (and:SI (plus:SI (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64]) (reg:SI 119)) (reg:SI 121)) (and:SI (not:SI (reg:SI 121)) (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64])))) (set (reg:SI 122) (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64])) (set (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64]) (unspec:SI [ (ior:SI (and:SI (plus:SI (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64]) (reg:SI 119)) (reg:SI 121)) (and:SI (not:SI (reg:SI 121)) (mem/v:QI (reg/f:SI 115 virtual-stack-vars) [-1 S1 A64]))) ] 40)) (clobber (scratch:CC)) (clobber (scratch:SI)) ]) -1 (nil) (nil)) Does anyone know why that happens? Thanks, Razya