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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [net8.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-pedantic-errors" }
3
 
4
class Base {
5
public:
6
  int foo;
7
};
8
 
9
class Derived : public Base {
10
public:
11
  int bar;
12
};
13
 
14
void func(Base&);                 // { dg-error "passing argument 1" }
15
 
16
void func2(const Derived& d) {
17
  func(d);                              // { dg-error "invalid initialization" }
18
}
19
 
20
void
21
foo (int& a)                            // { dg-error "in passing argument 1" }
22
{
23
}
24
 
25
int main ()
26
{
27
  int b;
28
  const int*const a = &b;
29
  *a = 10;                              // { dg-error "read-only location" }
30
  foo (*a);                             // { dg-error "invalid initialization" }
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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