ref: 82da9942dee95f8d0560d89e066b91761403bc99
parent: af549516e8dc30b0d18b66ab288c18287ce25bb2
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Aug 29 04:36:18 EDT 2016
[cc1] Fix conmutative() with == and != Equality operators are full conmutative, so it is not needed to negate the operator when we apply the conmutative rule.
--- a/cc1/fold.c
+++ b/cc1/fold.c
@@ -365,9 +365,9 @@
case OGT:
case OGE:
case OLE:
+ *op = negop(*op);
case OEQ:
case ONE:
- *op = negop(*op);
case OADD:
case OMUL:
case OBAND:
--- a/cc1/tests/test056.c
+++ b/cc1/tests/test056.c
@@ -27,7 +27,7 @@
G13 I F "main
{
\
- h G9 M7 .V6 'P #P2 +P @K gI gN #N0 !I
+ h G9 M7 .V6 'P #P2 +P @K gI gN #N0 =I
}
*/