public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17067] New: Miss call constructors in global instances and static members of classes
@ 2004-08-17 17:40 rusek at ccs dot cz
2004-08-17 17:45 ` [Bug c++/17067] " rusek at ccs dot cz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rusek at ccs dot cz @ 2004-08-17 17:40 UTC (permalink / raw)
To: gcc-bugs
Hi!
On Unix like platforms with configurations:
Reading specs from /usr/local/lib/gcc/i386-portbld-freebsd4.8/3.4.2/specs
Configured with: ./..//gcc-3.4-20040806/configure --disable-nls --enable-
threads=posix --with-system-zlib --with-libiconv-prefix=/usr/local --program-
suffix=34 --with-gxx-include-dir=/usr/local/lib/gcc/i386-portbld-
freebsd4.8/3.4.2/include/c++/ --disable-shared --prefix=/usr/local i386-portbld-
freebsd4.8
Thread model: posix
gcc version 3.4.2 20040806 (prerelease) [FreeBSD]
and
Reading specs from /ufs/milan2/gcc-3.4.1/lib/gcc/hppa2.0w-hp-
hpux11.11/3.4.1/specs
Configured with: ./configure --prefix=/ufs/milan2/gcc --with-local-
prefix=/usr/local/bin --with-gnu-as --with-as=/ufs/milan2/binutils/bin/as --
with-gnu-ld=no --with-libiconv-prefix=/usr/local --disable-shared --enable-
threads=posix --disable-nls
Thread model: posix
gcc version 3.4.1
I compile my project with the g++ compiler and it makes bad binaries without
constructor calls in static members and global instances of classes. It call
member of class without call constructor before in members of class, which is
defined as static. The same source code in mingw32 works well. The win32
configuration is
Reading specs from D:/Develop/DevCpp/bin/../lib/gcc/mingw32/3.4.1/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.1 (mingw special)
I can send the source code by email to you, because I don't see any upload
controls on this Bugzilla page. Please, contact me.
Milan
--
Summary: Miss call constructors in global instances and static
members of classes
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rusek at ccs dot cz
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: on UNIX machines
GCC target triplet: i386-portbld-freebsd4.8 and hppa2.0w-hp-hpux11.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17067
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17067] Miss call constructors in global instances and static members of classes
2004-08-17 17:40 [Bug c++/17067] New: Miss call constructors in global instances and static members of classes rusek at ccs dot cz
@ 2004-08-17 17:45 ` rusek at ccs dot cz
2004-08-17 17:55 ` rusek at ccs dot cz
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rusek at ccs dot cz @ 2004-08-17 17:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rusek at ccs dot cz 2004-08-17 17:45 -------
Created an attachment (id=6950)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6950&action=view)
Source code where bug occurs
On mingw32 works well, but on Unix platforms FreeBSD and HPUX does not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17067
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17067] Miss call constructors in global instances and static members of classes
2004-08-17 17:40 [Bug c++/17067] New: Miss call constructors in global instances and static members of classes rusek at ccs dot cz
2004-08-17 17:45 ` [Bug c++/17067] " rusek at ccs dot cz
@ 2004-08-17 17:55 ` rusek at ccs dot cz
2004-08-17 23:34 ` pinskia at gcc dot gnu dot org
2004-08-18 7:16 ` rusek at ccs dot cz
3 siblings, 0 replies; 5+ messages in thread
From: rusek at ccs dot cz @ 2004-08-17 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rusek at ccs dot cz 2004-08-17 17:55 -------
Works well on mingw32 any versions
Fails on i386-portbld-freebsd4.8, hppa2.0w-hp-hpux11.11 version 3.4.x and older
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17067
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17067] Miss call constructors in global instances and static members of classes
2004-08-17 17:40 [Bug c++/17067] New: Miss call constructors in global instances and static members of classes rusek at ccs dot cz
2004-08-17 17:45 ` [Bug c++/17067] " rusek at ccs dot cz
2004-08-17 17:55 ` rusek at ccs dot cz
@ 2004-08-17 23:34 ` pinskia at gcc dot gnu dot org
2004-08-18 7:16 ` rusek at ccs dot cz
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-17 23:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-17 23:34 -------
Not a bug, you are making a static library (a .a) so the linker does not pull in the unreferenced object
files which cuases your issue.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17067
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17067] Miss call constructors in global instances and static members of classes
2004-08-17 17:40 [Bug c++/17067] New: Miss call constructors in global instances and static members of classes rusek at ccs dot cz
` (2 preceding siblings ...)
2004-08-17 23:34 ` pinskia at gcc dot gnu dot org
@ 2004-08-18 7:16 ` rusek at ccs dot cz
3 siblings, 0 replies; 5+ messages in thread
From: rusek at ccs dot cz @ 2004-08-18 7:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rusek at ccs dot cz 2004-08-18 07:16 -------
(In reply to comment #3)
> Not a bug, you are making a static library (a .a) so the linker does not pull
in the unreferenced object
> files which cuases your issue.
Hi Andrew!
Thank you for response at bugzilla. Can you tell me any unreferenced object
file which causes the issue? I try to make it well, but I don't see the
problem...Why the issue does not occures in mingw32?
Milan Rusek
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17067
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-18 7:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17 17:40 [Bug c++/17067] New: Miss call constructors in global instances and static members of classes rusek at ccs dot cz
2004-08-17 17:45 ` [Bug c++/17067] " rusek at ccs dot cz
2004-08-17 17:55 ` rusek at ccs dot cz
2004-08-17 23:34 ` pinskia at gcc dot gnu dot org
2004-08-18 7:16 ` rusek at ccs dot cz
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).