Commit 7485f79f by Jakub Jelinek Committed by Jakub Jelinek

* g++.dg/opt/cond1.C: New test.

From-SVN: r72022
parent 08903e08
2003-10-02 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/cond1.C: New test.
2003-10-01 Kelley Cook <kelleycook@wideopenwest.com>
* gcc.dg/Wold-style-definition-2.c: New testcase.
......
// { dg-do run }
// { dg-options "-O2" }
struct D { int x; };
struct W
{
W () {}
D & operator * () { return d; }
D d;
};
int
foo (int y)
{
W m;
(*m).x = (y > 1 ? y : 0);
return (*m).x;
}
int
main ()
{
return (foo (6) != 6);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment