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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [crash40.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* PR c++/34059 */
2
/* { dg-do compile } */
3
 
4
struct A
5
{
6
  template void foo();
7
};
8
struct B : A {};
9
struct C : A {};
10
 
11
class AA
12
{
13
  template void foo(); /* { dg-error "is private" } */
14
};
15
struct BB : AA {};
16
 
17
class AAA {
18
  int get() const {}
19
};
20
struct BBB {
21
  static BBB *foo();
22
private:
23
  int get() const {} /* { dg-error "is private" } */
24
};
25
template struct S {
26
  S(unsigned int = BBB::foo()->AAA::get()); /* { dg-error "is not a base of" } */
27
};
28
template struct SS {
29
  SS(unsigned int = BBB::foo()->get());
30
};
31
 
32
void bar()
33
{
34
  B().C::foo<0>(); /* { dg-error "is not a member of" } */
35
  BB().AA::foo<0>(); /* { dg-error "within this context" } */
36
 
37
  int i;
38
  i.C::foo<0>(); /* { dg-error "which is of non-class type" } */
39
 
40
  S s; /* { dg-error "default argument" } */
41
  SS ss; /* { dg-error "within this context" } */
42
}

powered by: WebSVN 2.1.0

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