[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-07-08 Thread jakub at gcc dot gnu dot org
--- Comment #11 from jakub at gcc dot gnu dot org 2010-07-08 17:08 --- Fixed. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-06-30 Thread jakub at gcc dot gnu dot org
--- Comment #10 from jakub at gcc dot gnu dot org 2010-06-30 15:17 --- Subject: Bug 44059 Author: jakub Date: Wed Jun 30 15:16:54 2010 New Revision: 161607 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161607 Log: Backport from mainline 2010-05-11 Jakub Jelinek

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-11 Thread jakub at gcc dot gnu dot org
--- Comment #8 from jakub at gcc dot gnu dot org 2010-05-11 18:14 --- Subject: Bug 44059 Author: jakub Date: Tue May 11 18:14:19 2010 New Revision: 159287 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159287 Log: PR c++/44059 * config/elfos.h

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-11 Thread jakub at gcc dot gnu dot org
--- Comment #9 from jakub at gcc dot gnu dot org 2010-05-11 18:28 --- Fixed on the trunk so far, will backport to 4.5 after a while if there aren't any issues with it on the trunk. -- jakub at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread ivan dot stankovic at avl dot com
--- Comment #1 from ivan dot stankovic at avl dot com 2010-05-10 13:40 --- Created an attachment (id=20619) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20619action=view) The test case Just unpack and run 'make; make run'. The output should be something like: x initialized at

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-05-10 13:54 --- It works for me. You need to build shared libraries with -fPIC. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-05-10 13:57 --- Or rather as you use dlopen you need to use RTLD_GLOBAL. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44059

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread jakub at gcc dot gnu dot org
--- Comment #4 from jakub at gcc dot gnu dot org 2010-05-10 14:09 --- Re: #c2, that's just because you are using too old binutils I guess. The bug seems to be in: .type _ZGVZN1AC1EvE1x, @object .type _ZZN1AC1EvE1x, @gnu_unique_object I believe the guard needs to be

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread ivan dot stankovic at avl dot com
--- Comment #5 from ivan dot stankovic at avl dot com 2010-05-10 14:14 --- Indeed, using RTLD_GLOBAL works around the problem. However, I don't think one should just resort to using this flag with dlopen everywhere. The problem was originally found with Python modules written in C, and

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread jakub at gcc dot gnu dot org
--- Comment #6 from jakub at gcc dot gnu dot org 2010-05-10 14:39 --- I guess the problem is in the !DECL_ARTIFICIAL (DECL) test in ASM_DECLARE_OBJECT_NAME macro - the guard is artificial. Not sure why that has been added. /* For template static data member instantiations or

[Bug c++/44059] Static initializers executed more than once when using unique global symbols

2010-05-10 Thread jakub at gcc dot gnu dot org
--- Comment #7 from jakub at gcc dot gnu dot org 2010-05-10 14:39 --- Reopening. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED