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++/7294: GCC 3.1 problem with templates


>Number:         7294
>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:15:59 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Vincent Lascaux
>Release:        gcc version 3.1
>Organization:
>Environment:
winXP
>Description:
The following code leads to an "internal error"

main.cpp:
---------

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
>How-To-Repeat:
Compile the code
>Fix:
If you find one, please, tell me :)
>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]