OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [local1.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// PR c++/4286: We were crashing when trying to set up the class bindings in
2
// g(), because xref wanted the mangled name, which breaks inside a template.
3
 
4
// Of course, the offending code is actually ill-formed anyway, so check
5
// for the error.  Also check that it's formatted properly.
6
 
7
struct A
8
{
9
  template void f();
10
};
11
 
12
template void A::f()
13
{
14
  struct B
15
  {
16
    void g() {}
17
    static int x;       // { dg-error "static.*int A::f\\(\\)::B::x" "" }
18
  };
19
}
20
 
21
int main ()
22
{
23
  A a;
24
  a.f ();
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.