===================================================================
@@ -1,3 +1,9 @@
+2010-12-17 Bernd Schmidt <bernds@codesourcery.com>
+
+ * config/arm/arm.c (arm_select_cc_mode): Before calling
+ arm_select_dominance_cc_mode for AND or IOR operations, ensure
+ that op is NE or EQ.
+
2010-12-17 Dodji Seketeli <dodji@redhat.com>
* dwarf2out.c (gen_type_die_with_usage): Do not try to emit debug
===================================================================
@@ -0,0 +1,36 @@
+/* Testcase provided by HUAWEI. */
+#include <stdio.h>
+int main()
+{
+ int cur_k;
+ int cur_j=0;
+ int cur_i=28;
+ unsigned char temp_data[8];
+ unsigned int Data_Size=20;
+
+ for (cur_k=0;cur_j<7;cur_j++,cur_i++) {
+ if (cur_j%2==0) {
+ temp_data[cur_k++]=0;
+ }
+ if (cur_k==7) {
+ for (;cur_k>0;cur_k--) {
+ if (cur_k>2) {
+ if ((temp_data[7-cur_k]=='n' || temp_data[7-cur_k]=='N' ) && (temp_data[7-cur_k+1]=='a' || temp_data[7-cur_k+1]=='A' )) {
+ break;
+ }
+ }
+ if (cur_k==1) {
+ if (temp_data[7-cur_k]=='n' || temp_data[7-cur_k]=='N' ) {
+ break;
+ }
+ }
+ }
+ if (cur_k==7) {
+ } else {
+ if (cur_k>0)
+ printf("dfjk");
+ }
+ }
+ }
+return 0;
+}
===================================================================
@@ -1,3 +1,7 @@
+2010-12-17 Bernd Schmidt <bernds@codesourcery.com>
+
+ * gcc.c-torture/compile/20101217-1.c: New test.
+
2010-12-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/46849
===================================================================
@@ -10602,12 +10602,14 @@ arm_select_cc_mode (enum rtx_code op, rt
/* Alternate canonicalizations of the above. These are somewhat cleaner. */
if (GET_CODE (x) == AND
+ && (op == EQ || op == NE)
&& COMPARISON_P (XEXP (x, 0))
&& COMPARISON_P (XEXP (x, 1)))
return arm_select_dominance_cc_mode (XEXP (x, 0), XEXP (x, 1),
DOM_CC_X_AND_Y);
if (GET_CODE (x) == IOR
+ && (op == EQ || op == NE)
&& COMPARISON_P (XEXP (x, 0))
&& COMPARISON_P (XEXP (x, 1)))
return arm_select_dominance_cc_mode (XEXP (x, 0), XEXP (x, 1),