This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5933: HP-UX: broken MI of virtual classes



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]