diff options
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99316.patch')
-rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99316.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99316.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99316.patch new file mode 100644 index 000000000..c7f92b6fc --- /dev/null +++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99316.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | 2010-07-20 Yao Qi <yao@codesourcery.com> | ||
2 | |||
3 | Merge from Sourcery G++ 4.4: | ||
4 | 2010-06-07 Kazu Hirata <kazu@codesourcery.com> | ||
5 | |||
6 | Issue #8535 | ||
7 | |||
8 | Backport from mainline: | ||
9 | gcc/ | ||
10 | 2010-06-07 Kazu Hirata <kazu@codesourcery.com> | ||
11 | PR rtl-optimization/44404 | ||
12 | * auto-inc-dec.c (find_inc): Use reg_overlap_mentioned_p instead | ||
13 | of count_occurrences to see if it's safe to modify mem_insn.insn. | ||
14 | |||
15 | gcc/testsuite/ | ||
16 | 2010-06-07 Kazu Hirata <kazu@codesourcery.com> | ||
17 | PR rtl-optimization/44404 | ||
18 | * gcc.dg/pr44404.c: New. | ||
19 | |||
20 | 2010-08-03 Chung-Lin Tang <cltang@codesourcery.com> | ||
21 | |||
22 | Backport from mainline: | ||
23 | |||
24 | === modified file 'gcc/auto-inc-dec.c' | ||
25 | --- old/gcc/auto-inc-dec.c 2010-04-02 18:54:46 +0000 | ||
26 | +++ new/gcc/auto-inc-dec.c 2010-08-05 11:30:21 +0000 | ||
27 | @@ -1068,7 +1068,7 @@ | ||
28 | /* For the post_add to work, the result_reg of the inc must not be | ||
29 | used in the mem insn since this will become the new index | ||
30 | register. */ | ||
31 | - if (count_occurrences (PATTERN (mem_insn.insn), inc_insn.reg_res, 1) != 0) | ||
32 | + if (reg_overlap_mentioned_p (inc_insn.reg_res, PATTERN (mem_insn.insn))) | ||
33 | { | ||
34 | if (dump_file) | ||
35 | fprintf (dump_file, "base reg replacement failure.\n"); | ||
36 | |||
37 | === added file 'gcc/testsuite/gcc.dg/pr44404.c' | ||
38 | --- old/gcc/testsuite/gcc.dg/pr44404.c 1970-01-01 00:00:00 +0000 | ||
39 | +++ new/gcc/testsuite/gcc.dg/pr44404.c 2010-08-05 11:30:21 +0000 | ||
40 | @@ -0,0 +1,35 @@ | ||
41 | +/* PR rtl-optimization/44404 | ||
42 | + foo() used to be miscompiled on ARM due to a bug in auto-inc-dec.c, | ||
43 | + which resulted in "strb r1, [r1], #-36". */ | ||
44 | + | ||
45 | +/* { dg-do run } */ | ||
46 | +/* { dg-options "-O2 -fno-unroll-loops" } */ | ||
47 | + | ||
48 | +extern char *strcpy (char *, const char *); | ||
49 | +extern int strcmp (const char*, const char*); | ||
50 | +extern void abort (void); | ||
51 | + | ||
52 | +char buf[128]; | ||
53 | + | ||
54 | +void __attribute__((noinline)) | ||
55 | +bar (int a, const char *p) | ||
56 | +{ | ||
57 | + if (strcmp (p, "0123456789abcdefghijklmnopqrstuvwxyz") != 0) | ||
58 | + abort (); | ||
59 | +} | ||
60 | + | ||
61 | +void __attribute__((noinline)) | ||
62 | +foo (int a) | ||
63 | +{ | ||
64 | + if (a) | ||
65 | + bar (0, buf); | ||
66 | + strcpy (buf, "0123456789abcdefghijklmnopqrstuvwxyz"); | ||
67 | + bar (0, buf); | ||
68 | +} | ||
69 | + | ||
70 | +int | ||
71 | +main (void) | ||
72 | +{ | ||
73 | + foo (0); | ||
74 | + return 0; | ||
75 | +} | ||
76 | |||