* support/regression/tests/bug1734654.c: added
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4847
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2007-06-10 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
+
+ * src/mcs51/peeph.def: disabled rule 132.d to fix #1734654
+ * support/regression/tests/bug1734654.c: added
+
2007-06-10 Maarten Brock <sourceforge.brock AT dse.nl>
* src/SDCCast.c (decorateType): optimized '?' for equal operands
jc %5
} if operandsLiteral(%1)
-replace {
- clr c
- mov a,%1
- subb a,#%2
- mov %3,c
-} by {
- ; Peephole 132.d optimized genCmpGt by inverse logic
- mov a,#0x100 - %2
- add a,%1
- mov %3,c
-} if operandsNotRelated('0x00' %2), operandsLiteral(%2)
+// disabled. See bug1734654.c
+//replace {
+// clr c
+// mov a,%1
+// subb a,#%2
+// mov %3,c
+//} by {
+// ; Peephole 132.d optimized genCmpGt by inverse logic
+// mov a,#0x100 - %2
+// add a,%1
+// mov %3,c
+//} if operandsNotRelated('0x00' %2), operandsLiteral(%2)
replace {
clr c
--- /dev/null
+/* bug1734654.c
+ */
+#include <testfwk.h>
+#include <stdbool.h>
+
+volatile bool b;
+volatile unsigned char c = 1;
+
+static void foo (void)
+{
+ b = (c<2);
+}
+
+void
+testMyFunc(void)
+{
+ foo ();
+ ASSERT (b);
+}