This is the mail archive of the gcc-prs@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]

Re: c++/8772: Segmentation fault on 3 lines of template code


The following reply was made to PR c++/8772; it has been noted by GNATS.

From: Zack Weinberg <zack@codesourcery.com>
To: sneechy@hotmail.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/8772: Segmentation fault on 3 lines of template code
Date: Sat, 30 Nov 2002 20:06:11 -0800

 sneechy@hotmail.com writes:
 
 
 > Compiling the following three lines of code:
 >
 > template <int> struct A { template <int> struct B { enum { v = 1 }; }; };
 > template <template <int> class F> struct C { enum { v = F<1>::v || 2 }; };
 > template <int n> struct D { enum { v = C<A<n>::B>::v }; };
 >
 > Result in an segmentation fault.
 
 Reproduced with 3.2.1 and 3.3:
 
 test.c: In instantiation of `C<A<<anonymous> >::B>':
 test.c:3:   instantiated from here
 test.c:2: internal compiler error: Segmentation fault
 
 2.95 also ICEs, but in a different fashion:
 
 test.c:3: Internal compiler error 980422.
 
 I do not know whether this is valid C++ or not.
 
 zw


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