public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9629: [3.2/3.3/3.4 regression] virtual inheritance segfault
@ 2003-02-21 16:08 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2003-02-21 16:08 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nathan, nobody, stefan
Synopsis: [3.2/3.3/3.4 regression] virtual inheritance segfault
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Fri Feb 21 16:08:06 2003
Responsible-Changed-Why:
fixing
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9629
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9629: [3.2/3.3/3.4 regression] virtual inheritance segfault
@ 2003-03-17 11:52 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2003-03-17 11:52 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nathan, stefan
Synopsis: [3.2/3.3/3.4 regression] virtual inheritance segfault
State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Mon Mar 17 11:52:48 2003
State-Changed-Why:
fixed on HEAD and 3.3
2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9629
* cp-tree.h (struct language_function): Add in_base_initializer.
(in_base_initializer): define it.
(expand_member_init): Remove INIT param.
* init.c (expand_member_init): Remove INIT param, return the member.
(emit_mem_initializers): Set in_base_initializer.
* class.c (build_base_path): Check in_base_initializer.
* parser.c (cp_parser_mem_initializer): Set in_base_initializer.
* pt.c (tsubst_initializer_list): Likewise.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9629
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9629: [3.2/3.3/3.4 regression] virtual inheritance segfault
@ 2003-02-14 20:46 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-02-14 20:46 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, stefan
Old Synopsis: virtual inheritance segfault
New Synopsis: [3.2/3.3/3.4 regression] virtual inheritance segfault
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Feb 14 20:46:18 2003
State-Changed-Why:
Confirmed. Here's a very slightly reduced testcase:
--------------------------
struct A { };
struct B {
B(A *) {}
};
struct C : virtual public A, public B {
C() : B(this) {}
};
struct D : virtual public C {};
main() {
new D();
}
------------------------
Executing this program segfaults with 3.2.2, 3.3, and 3.4.
So it is a regression, assuming the code is legal.
The problem is in casting this to A* in the constructor
C::C. It's trying to cast to a virtual base, and it seems
to me that this information is not available at the time
we get to C::C, which then causes the segfault. But that's
just a wild guess.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9629
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-17 11:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-21 16:08 c++/9629: [3.2/3.3/3.4 regression] virtual inheritance segfault nathan
-- strict thread matches above, loose matches on Subject: below --
2003-03-17 11:52 nathan
2003-02-14 20:46 bangerth
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).