public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66173] New: -fno-threadsafe-statics suppresses guard functions but not guard variables
@ 2015-05-16  5:22 eleventen at gmail dot com
  2015-05-16  5:43 ` [Bug c++/66173] " eleventen at gmail dot com
  2015-05-16  6:11 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: eleventen at gmail dot com @ 2015-05-16  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66173
           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: ---

Created attachment 35553
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35553&action=edit
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/66173] -fno-threadsafe-statics suppresses guard functions but not guard variables
  2015-05-16  5:22 [Bug c++/66173] New: -fno-threadsafe-statics suppresses guard functions but not guard variables eleventen at gmail dot com
@ 2015-05-16  5:43 ` eleventen at gmail dot com
  2015-05-16  6:11 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: eleventen at gmail dot com @ 2015-05-16  5:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Marc Singer <eleventen at gmail dot com> ---
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/66173] -fno-threadsafe-statics suppresses guard functions but not guard variables
  2015-05-16  5:22 [Bug c++/66173] New: -fno-threadsafe-statics suppresses guard functions but not guard variables eleventen at gmail dot com
  2015-05-16  5:43 ` [Bug c++/66173] " eleventen at gmail dot com
@ 2015-05-16  6:11 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-16  6:11 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

*** This bug has been marked as a duplicate of bug 66172 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-16  6:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-16  5:22 [Bug c++/66173] New: -fno-threadsafe-statics suppresses guard functions but not guard variables eleventen at gmail dot com
2015-05-16  5:43 ` [Bug c++/66173] " eleventen at gmail dot com
2015-05-16  6:11 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).