This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2604: Loki-related seg fault
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2604: Loki-related seg fault
- From: pcarlini at unitus dot it
- Date: 21 Apr 2001 08:56:54 -0000
- Cc: pme at gcc dot gnu dot org, gdr at codesourcery dot com
- Reply-To: pcarlini at unitus dot it
>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: