https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66172

            Bug ID: 66172
           Summary: -fno-threadsafe-statics suppresses guard functions but
                    not guard variables
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eleventen at gmail dot com
  Target Milestone: ---

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

--- Comment #1 from Marc Singer <eleventen at gmail dot com> ---
I neglected to include the version information:

# g++ --version
g++ (Debian 4.9.2-10) 4.9.2

Reply via email to