public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/52184] New: Wrong object initialization in @ 2012-02-09 16:41 kamil.holubicki at gmail dot com 2012-02-09 16:44 ` [Bug c++/52184] " kamil.holubicki at gmail dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: kamil.holubicki at gmail dot com @ 2012-02-09 16:41 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52184 Bug #: 52184 Summary: Wrong object initialization in Classification: Unclassified Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: kamil.holubicki@gmail.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52184] Wrong object initialization in 2012-02-09 16:41 [Bug c++/52184] New: Wrong object initialization in kamil.holubicki at gmail dot com @ 2012-02-09 16:44 ` kamil.holubicki at gmail dot com 2012-02-09 16:47 ` kamil.holubicki at gmail dot com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: kamil.holubicki at gmail dot com @ 2012-02-09 16:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52184 --- Comment #1 from Kamil <kamil.holubicki at gmail dot com> 2012-02-09 16:44:01 UTC --- Created attachment 26623 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26623 Short example demonstrating problem ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52184] Wrong object initialization in 2012-02-09 16:41 [Bug c++/52184] New: Wrong object initialization in kamil.holubicki at gmail dot com 2012-02-09 16:44 ` [Bug c++/52184] " kamil.holubicki at gmail dot com @ 2012-02-09 16:47 ` kamil.holubicki at gmail dot com 2012-02-09 16:56 ` redi at gcc dot gnu.org 2012-02-09 18:01 ` [Bug c++/52184] Wrong object initialization in virtual inhreitance pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: kamil.holubicki at gmail dot com @ 2012-02-09 16:47 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52184 --- Comment #2 from Kamil <kamil.holubicki at gmail dot com> 2012-02-09 16:46:55 UTC --- Base virtual class object is corrupted when explicitly called auto generated constructor from derived class inititalization list. Attached file demonstrates problem. The only difference between constructors of Derived class is that first one explicitly states which Base1 constructor should be called. I would expect that both cout in main() print 8. Unfortunately the first one prints 0. f I enable explicit definition of Base1 constructor it fixes the problem. If I remove virtual inheritance in Derived class definition (class Derived: public A1, public A2) it works as well. Tested also on 4.6.1 version - issue still exist. Does not exist on 3.4.4. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52184] Wrong object initialization in 2012-02-09 16:41 [Bug c++/52184] New: Wrong object initialization in kamil.holubicki at gmail dot com 2012-02-09 16:44 ` [Bug c++/52184] " kamil.holubicki at gmail dot com 2012-02-09 16:47 ` kamil.holubicki at gmail dot com @ 2012-02-09 16:56 ` redi at gcc dot gnu.org 2012-02-09 18:01 ` [Bug c++/52184] Wrong object initialization in virtual inhreitance pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2012-02-09 16:56 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52184 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-09 16:55:12 UTC --- 4.7 prints 8, agreeing with other compilers ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52184] Wrong object initialization in virtual inhreitance 2012-02-09 16:41 [Bug c++/52184] New: Wrong object initialization in kamil.holubicki at gmail dot com ` (2 preceding siblings ...) 2012-02-09 16:56 ` redi at gcc dot gnu.org @ 2012-02-09 18:01 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-02-09 18:01 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52184 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.6.3 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-09 18:00:42 UTC --- (In reply to comment #3) > 4.7 prints 8, agreeing with other compilers It was either PR 51331 or PR 50618 so closing as fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-09 18:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-02-09 16:41 [Bug c++/52184] New: Wrong object initialization in kamil.holubicki at gmail dot com 2012-02-09 16:44 ` [Bug c++/52184] " kamil.holubicki at gmail dot com 2012-02-09 16:47 ` kamil.holubicki at gmail dot com 2012-02-09 16:56 ` redi at gcc dot gnu.org 2012-02-09 18:01 ` [Bug c++/52184] Wrong object initialization in virtual inhreitance 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).