This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.1/4.0/3.4] fix pr19672 by tuning expansion of TRUTH_{AND,OR}_EXPR
> Paulo, please do apply this patch to 4.0 and 4.1.
Attached is a C testcase that would have triggered at -O0 (on the 3.4 branch).
It relies on the transformation BIT_AND_EXPR -> TRUTH_AND_EXPR in the folder,
as pointed out by Richard Kenner.
Can I install it on all open branches?
2005-10-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20051021-1.c: New test.
--
Eric Botcazou
/* 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;
}