c++/7295: GCC 3.1 problem with templates

vincent.lascaux@ifrance.com vincent.lascaux@ifrance.com
Fri Jul 12 14:36:00 GMT 2002

>Number:         7295
>Category:       c++
>Synopsis:       GCC 3.1 problem with templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 12 14:16:00 PDT 2002
>Originator:     Vincent Lascaux
>Release:        gcc version 3.1
The following code leads to an "internal error"


template<template<class A> class CContainer>
struct CFoo
    typedef int i;
    CContainer<int> Foo;
template<class B>
struct CTest
    template<class A> struct value {};
    CFoo<value>::i CFooI;
int main() {}

g++ main.cpp
main.cpp: In instantiation of `CFoo<CTest<B>::value>':
main.cpp:11:   instantiated from here
main.cpp:3: internal error: Segmentation fault
Compile the code
If you find one, please, tell me :)

More information about the Gcc-bugs mailing list