go: don't crash if __atomic_fetch_add functions are used
commit219f82070903625d6bd8865b5ecb5f944bcee871
authorIan Lance Taylor <iant@golang.org>
Thu, 10 Nov 2022 00:05:08 +0000 (9 16:05 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 10 Nov 2022 00:06:10 +0000 (9 16:06 -0800)
tree31a72eaee329ef95b25e879fe9fa2405cf481fcf
parent965ce1ba392ca03c746cabb9ba73e66258557dcb
go: don't crash if __atomic_fetch_add functions are used

The Go frontend only generates __atomic_add_fetch, but in some cases
thost calls become __atomic_fetch_add.

Patch originally by Marc Poulhiès.

PR target/107581
* go-gcc.cc (Gcc_backend::Gcc_backend): Define
__atomic_fetch_add_{4,8}.
gcc/go/go-gcc.cc