From: Eric Botcazou Date: Fri, 21 Oct 2005 17:24:46 +0000 (+0000) Subject: * gcc.c-torture/execute/20051021-1.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=960d350257c380f7516201b4f666e09c958f7c42;p=gcc.git * gcc.c-torture/execute/20051021-1.c: New test. From-SVN: r105749 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f3dd7a519d..4a38c09b9de 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-10-21 Eric Botcazou + + * gcc.c-torture/execute/20051021-1.c: New test. + 2005-10-21 Mark Mitchell PR c++/24260 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 index 00000000000..0cd2c89ad8f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20051021-1.c @@ -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; +}