2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / cond1.C
blobae8fa4d45d9f7ee34f43debb4f38a7dc95ed41d3
1 // { dg-do run }
2 // { dg-options "-O2" }
4 struct D { int x; };
5 struct W
7   W () {}
8   D & operator * () { return d; }
9   D d;
12 int
13 foo (int y)
15   W m;
16   (*m).x = (y > 1 ? y : 0);
17   return (*m).x;
20 int
21 main ()
23   return (foo (6) != 6);