summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 12:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:41 +0100
commit478deec11f3349d61b1a922f047dc958dc07262a (patch)
tree1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch
parentd42dccf886983ba14ccc868041d7bea0cf1a260e (diff)
downloadpoky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on FSF gcc-4_2-branch since 4.6.0 was released They will roll into 4.6.1 release once that happens in coming approx 6 months time then we can simply remove them thats the reason so use a separate .inc file to define the SRC_URI additions (From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch
new file mode 100644
index 0000000000..c9303c4f34
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch
@@ -0,0 +1,93 @@
1From f16c1783b4b2c93a42eb36b4f136ec46bd3ce834 Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Wed, 13 Apr 2011 15:52:17 +0000
4Subject: [PATCH 115/200] PR middle-end/48591
5 * omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
6 NULL.
7 (expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.
8
9 * gcc.dg/gomp/pr48591.c: New test.
10
11 * testsuite/libgomp.c/pr48591.c: New test.
12
13
14git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172381 138bc75d-0d04-0410-961f-82ee72b054a4
15
16index c3f2178..5b0fdff 100644
17--- a/gcc/omp-low.c
18+++ b/gcc/omp-low.c
19@@ -5005,6 +5005,8 @@ expand_omp_atomic_fetch_op (basic_block load_bb,
20 return false;
21
22 decl = built_in_decls[base + index + 1];
23+ if (decl == NULL_TREE)
24+ return false;
25 itype = TREE_TYPE (TREE_TYPE (decl));
26
27 if (direct_optab_handler (optab, TYPE_MODE (itype)) == CODE_FOR_nothing)
28@@ -5056,6 +5058,8 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
29 edge e;
30
31 cmpxchg = built_in_decls[BUILT_IN_VAL_COMPARE_AND_SWAP_N + index + 1];
32+ if (cmpxchg == NULL_TREE)
33+ return false;
34 type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (addr)));
35 itype = TREE_TYPE (TREE_TYPE (cmpxchg));
36
37new file mode 100644
38index 0000000..e6cb106
39--- /dev/null
40+++ b/gcc/testsuite/gcc.dg/gomp/pr48591.c
41@@ -0,0 +1,22 @@
42+/* PR middle-end/48591 */
43+/* { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */
44+/* { dg-options "-fopenmp" } */
45+
46+extern void abort (void);
47+
48+int
49+main ()
50+{
51+ __float128 f = 0.0;
52+ int i;
53+ #pragma omp parallel for reduction(+:f)
54+ for (i = 0; i < 128; i++)
55+ f += 0.5Q;
56+ if (f != 64.0Q)
57+ abort ();
58+ #pragma omp atomic
59+ f += 8.5Q;
60+ if (f != 72.5Q)
61+ abort ();
62+ return 0;
63+}
64new file mode 100644
65index 0000000..18dfd7f
66--- /dev/null
67+++ b/libgomp/testsuite/libgomp.c/pr48591.c
68@@ -0,0 +1,22 @@
69+/* PR middle-end/48591 */
70+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* } } */
71+/* { dg-options "-fopenmp" } */
72+
73+extern void abort (void);
74+
75+int
76+main ()
77+{
78+ __float128 f = 0.0;
79+ int i;
80+ #pragma omp parallel for reduction(+:f)
81+ for (i = 0; i < 128; i++)
82+ f += 0.5Q;
83+ if (f != 64.0Q)
84+ abort ();
85+ #pragma omp atomic
86+ f += 8.5Q;
87+ if (f != 72.5Q)
88+ abort ();
89+ return 0;
90+}
91--
921.7.0.4
93