This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10158: [3.3/3.4 regression] ICE with templates and friends
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, poschmid at lbl dot gov
- Date: 20 Mar 2003 02:34:43 -0000
- Subject: Re: c++/10158: [3.3/3.4 regression] ICE with templates and friends
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, poschmid at lbl dot gov, gcc-gnats at gcc dot gnu dot org
Old Synopsis: ice (regression)
New Synopsis: [3.3/3.4 regression] ICE with templates and friends
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Mar 20 02:34:43 2003
State-Changed-Why:
Confirmed. Here's a redux:
-------------------------
namespace NS
{
struct B {};
struct D : B {};
}
template <int n>
struct X {
template <typename> friend void foo(NS::B&)
{ int i = n; }
};
X<351> bring_foo_into_scope;
int main() {
NS::D input;
foo<char> (input);
}
------------------------------
This crashes 3.3 and mainline, but not 3.2:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In function `void foo(NS::B&) [with {template default argument error} =
char, int n = 351]':
x.cc:16: instantiated from here
x.cc:10: internal compiler error: Segmentation fault
Please submit a full bug report,
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10158