https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99588
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu.org Last reconfirmed| |2021-03-15 Status|UNCONFIRMED |NEW Keywords| |diagnostic Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- We're likely confused by the "interesting" IL this emits: ;; Function test (null) ;; enabled by -tree-original { static atomic int x = 0; static atomic int x = 0; printf ((const char * restrict) "%d\n", TARGET_EXPR <D.2476, 1>; TARGET_EXPR <D.2477, (int) __atomic_add_fetch_4 ((volatile void *) &x, (unsigned int) TARGET_EXPR <D.2476, 1>, 5)>;, D.2477); } but clearly 'x' is used in the __atomic_add_fetch_4