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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [cond1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// { dg-options "-O2" }
3
 
4
struct D { int x; };
5
struct W
6
{
7
  W () {}
8
  D & operator * () { return d; }
9
  D d;
10
};
11
 
12
int
13
foo (int y)
14
{
15
  W m;
16
  (*m).x = (y > 1 ? y : 0);
17
  return (*m).x;
18
}
19
 
20
int
21
main ()
22
{
23
  return (foo (6) != 6);
24
}

powered by: WebSVN 2.1.0

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