summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99453.patch
blob: 8eb35325eee325a8f5d382dcc4fddbe193631eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
2010-12-17  Bernd Schmidt  <bernds@codesourcery.com>

	Issue #10208

	gcc/
	* 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.

	gcc/testsuite/
	* gcc.c-torture/compile/20101217-1.c: New test.

=== modified file 'gcc/config/arm/arm.c'
--- old/gcc/config/arm/arm.c	2010-12-21 14:13:38 +0000
+++ new/gcc/config/arm/arm.c	2011-01-05 11:32:50 +0000
@@ -10609,12 +10609,14 @@
 
   /* 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),

=== added file 'gcc/testsuite/gcc.c-torture/compile/20101217-1.c'
--- old/gcc/testsuite/gcc.c-torture/compile/20101217-1.c	1970-01-01 00:00:00 +0000
+++ new/gcc/testsuite/gcc.c-torture/compile/20101217-1.c	2011-01-05 11:32:50 +0000
@@ -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;
+}

OpenPOWER on IntegriCloud