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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [stmtexpr8.C] - Blame information for rev 832

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

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/27115
2
 
3
// { dg-do run }
4
// { dg-options "" }
5
 
6
struct A
7
{
8
  int i;
9
  A (int j) : i(j) {}
10
  A (const A &j) : i(j.i) {}
11
  A& operator= (const A &j) { i = j.i; return *this; }
12
};
13
 
14
A foo(int j)
15
{
16
  return ({ j ? A(1) : A(0); });
17
}
18
 
19
int main()
20
{
21
  return foo(1).i-1;
22
}
23
 
24
void foo2()
25
{
26
  A b = ({ A a(1); a; });
27
}
28
 

powered by: WebSVN 2.1.0

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