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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [op4.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* PR c++/26698 */
2
/* { dg-do compile } */
3
 
4
struct X {
5
  int x;
6
  X (int i = 0) : x (i) {}
7
  operator X& (void) const {
8
    return *(new X);
9
  }
10
};
11
 
12
void add_one (X & ref) { /* { dg-error "in passing argument" } */
13
  ++ ref.x;
14
}
15
 
16
void foo() {
17
  X const a (2);
18
  add_one(a); /* { dg-error "invalid initialization of reference of type" } */
19
}

powered by: WebSVN 2.1.0

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