public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3006: bad code for complicated virtual inheritance (regression from 2.95)
@ 2001-06-08  6:57 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2001-06-08  6:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jason, snyder

Synopsis: bad code for complicated virtual inheritance (regression from 2.95)

State-Changed-From-To: feedback->analyzed
State-Changed-By: nathan
State-Changed-When: Fri Jun  8 06:57:19 2001
State-Changed-Why:
    this is still failing. I attach the testcase I'm using (and
    was about to commit!)do you still want to work on it, or shall
    I?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3006&database=gcc


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

* Re: c++/3006: bad code for complicated virtual inheritance (regression from 2.95)
@ 2001-06-08  7:32 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2001-06-08  7:32 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jason, snyder

Synopsis: bad code for complicated virtual inheritance (regression from 2.95)

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Fri Jun  8 07:32:41 2001
State-Changed-Why:
    my mistake. I'd updated the ChangeLog, but not class.c. doh!
    
    2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
    
    	* g++.old-deja/g++.abi/vbase2.C: New test.
    	* g++.old-deja/g++.abi/vbase3.C: New test.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3006&database=gcc


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

* c++/3006: bad code for complicated virtual inheritance (regression from 2.95)
@ 2001-05-30 13:36 snyder
  0 siblings, 0 replies; 3+ messages in thread
From: snyder @ 2001-05-30 13:36 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3006
>Category:       c++
>Synopsis:       bad code for complicated virtual inheritance (regression from 2.95)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed May 30 13:36:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     scott snyder
>Release:        3.0 20010529 (prerelease)
>Organization:
>Environment:
System: Linux karma 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:

When the program below is compiled with gcc 3, it crashes with a SEGV
when run.  When compiled with gcc 2.95, it executes normally.

>How-To-Repeat:

-----------------------------------------------------
struct CORBA_Object
{
  virtual ~CORBA_Object() {}
};

class CORBA_Object_skel    : public virtual CORBA_Object {};
class CORBA_IRObject_skel  : virtual public CORBA_Object_skel {};
class CORBA_Container_skel : virtual public CORBA_IRObject_skel {};
class CORBA_IRObject_impl  : public virtual CORBA_IRObject_skel {};

class CORBA_Repository_impl
  : public virtual CORBA_Container_skel,
    public virtual CORBA_IRObject_impl
{
};


int
main(int argc, char* argv[])
{
  new CORBA_Repository_impl;
  return 0;
}
-----------------------------------------------------

[sss@karma translator]$ g++ -g -o xidl xidl.cpp
[sss@karma translator]$ ./xidl
Segmentation fault (core dumped)

Here's the stack trace where it crashed:


#0  0x804990d in _ZN19CORBA_IRObject_implC2Ev (this=0x804b62c, 
    __vtt_parm=0x804ae3c) at xidl.cpp:21
#1  0x80488c8 in _ZN21CORBA_Repository_implC1Ev (__vtt_parm=0x804b628)
    at xidl.cpp:21
#2  0x80487c1 in main (argc=1, argv=0xbfffd3b4) at xidl.cpp:21
(gdb) x/i $pc
0x804990d <_ZN19CORBA_IRObject_implC2Ev+109>:   mov    (%edx),%edx
(gdb) p/x $edx
$1 = 0x10094048
(gdb) x/x 0x10094048
0x10094048:     Cannot access memory at address 0x10094048



>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-06-08  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-08  6:57 c++/3006: bad code for complicated virtual inheritance (regression from 2.95) nathan
  -- strict thread matches above, loose matches on Subject: below --
2001-06-08  7:32 nathan
2001-05-30 13:36 snyder

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).