This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5933: HP-UX: broken MI of virtual classes
- From: porten at trolltech dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 13 Mar 2002 14:26:00 -0000
- Subject: c++/5933: HP-UX: broken MI of virtual classes
- Reply-to: porten at trolltech dot com
>Number: 5933
>Category: c++
>Synopsis: HP-UX: broken MI of virtual classes
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Mar 13 06:36:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Harri Porten
>Release: gcc version 3.1 20020308
>Organization:
>Environment:
hppa1.1-hp-hpux11.00
>Description:
When compiling the class defined in handler.h and handler.cpp
into a shared library on HP-UX 11.00 (B.11.28 ld) a call to
start() from an application (main.cpp) succeeds but never
returns.
// handler.h
#ifndef HANDLER_H
#define HANDLER_H
class H1 { public: virtual void foo() { } };
class H2 { public: virtual void start() = 0; };
class H12 : public H1, public H2 { public: void start(); };
#endif
// handler.cpp
#include "handler.h"
void H12::start()
{
}
// main.cpp
#include "handler.h"
int main()
{
H12 hnd;
H2* h2 = &hnd;
h2->start();
return 0;
}
>How-To-Repeat:
g++ -shared -fPIC -o libhandler.sl handler.cpp
g++ main.cpp libhandler.sl
./a.out (hangs forever)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: