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]

c++/2604: Loki-related seg fault



>Number:         2604
>Category:       c++
>Synopsis:       Loki-related seg fault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 21 02:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Paolo Carlini
>Release:        3.0 2001041, 3.1 20010417, verified on Codesourcery online test
>Organization:
>Environment:
i686, Linux2.2.19, glibc2.2.2, binutils2.11
>Description:
The following snippet of code, distilled form Loki set of
header files (www.moderncppdesign.com) (in particular,
Visitor.h), triggers a seg fault:

template <class AtomicType, template <class> class Unit>
class GenScatterHierarchy : public Unit<AtomicType>
{
};

template <class T, typename R>
class Visitor
{
public:
    typedef R ReturnType;
};

template <typename R>
struct VisitorBinder
{
    template <class T>
    struct Result : public Visitor<T, R>
    {
    };
};

template <typename R, class TList>
class CyclicVisitor
    : public GenScatterHierarchy<TList, VisitorBinder<R>::Result>
{
public:
    typedef R ReturnType;
};

class DocElement
{
public:
    CyclicVisitor<void, DocElement>::ReturnType fun() {}
};
>How-To-Repeat:
This is not a regression from 2.95.2, which crashes with
an ICE 980422; many widespread compilers reject the code,
however, one of them compiles it just fine.
>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]