https://github.com/efriedma-quic commented:
Missing testcase. And somehow you mixed in your FROUND patch. There's a FIXME related to this in CodeGenFunction::EmitVarDecl. Skipping the guarded init is not threadsafe: if one thread accesses the variable while another thread is performing init, that's a race, even if the stored values are actually equal. On targets that support comdats, we might be able to emit a guard variable in initialized form; that way, we wouldn't write to the variable even if it isn't constant-folded in some translation unit. https://github.com/llvm/llvm-project/pull/226645 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
