]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Fri, 19 Dec 2003 13:54:37 +0000 (13:54 +0000)
committerNo Author <no-author@gcc.gnu.org>
Fri, 19 Dec 2003 13:54:37 +0000 (13:54 +0000)
'gcc-3_3-branch'.

From-SVN: r74833

gcc/testsuite/g++.dg/opt/expect1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/opt/expect1.C b/gcc/testsuite/g++.dg/opt/expect1.C
new file mode 100644 (file)
index 0000000..90a871f
--- /dev/null
@@ -0,0 +1,17 @@
+// PR c++/13239
+// { dg-do run }
+// { dg-options "-O2" }
+
+extern "C" void abort (void);
+
+struct Y {
+  int i;
+};
+
+bool foo () { return true; }
+Y bar () { Y y = {0}; return y; }
+
+int main ()
+{
+  __builtin_expect (foo () && (bar ().i) == 0, 0) ? 0 : (abort (), 1);
+}