Created attachment 35553 [details] Source file demonstrating that the guard variable isn't suppressed. The use of the -fno-threadsafe-statics eliminates the function references to the guard functions, __cxa_guard_acquire __cxa_guard_release but it doesn't eliminate the variables used to guard the initialization. A compiled version of the attached file using the g++ command line therein generated no references to the guard functions, but the guard variable remains. # nm -C guard | grep guard 0000000000600a88 b guard variable for f()::a
I neglected to include information about the version of the compiler. This is a 64 bit compiler on amd64. # g++ --version g++ (Debian 4.9.2-10) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
. *** This bug has been marked as a duplicate of bug 66172 ***