]> 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, 21 Oct 2005 17:24:46 +0000 (17:24 +0000)
committerNo Author <no-author@gcc.gnu.org>
Fri, 21 Oct 2005 17:24:46 +0000 (17:24 +0000)
'gcc-3_4-branch'.

From-SVN: r105750

gcc/testsuite/gcc.c-torture/execute/20051021-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/execute/20051021-1.c b/gcc/testsuite/gcc.c-torture/execute/20051021-1.c
new file mode 100644 (file)
index 0000000..0cd2c89
--- /dev/null
@@ -0,0 +1,28 @@
+/* Verify that TRUTH_AND_EXPR is not wrongly changed to TRUTH_ANDIF_EXPR.  */
+
+extern void abort (void);
+
+int count = 0;
+
+int foo1(void)
+{
+  count++;
+  return 0;
+}
+
+int foo2(void)
+{
+  count++;
+  return 0;
+}
+
+int main(void)
+{
+  if ((foo1() == 1) & (foo2() == 1))
+    abort ();
+
+  if (count != 2)
+    abort ();
+
+  return 0;
+}