summaryrefslogtreecommitdiff
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 11:54:44 +0100
commitb0d5b9f12adbce2c4a0df6059f5671188cd32293 (patch)
treef376fcd2e5dcc46185d73d619ce2eec31320d812 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0115-PR-middle-end-48591.patch
parent81859b136c0153e8d5be71d56e910dcc3e8cdb66 (diff)
downloadopenembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.gz
openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.bz2
openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.xz
openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.zip
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 Signed-off-by: Khem Raj <raj.khem@gmail.com>
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 000000000..c9303c4f3
--- /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 @@
+From f16c1783b4b2c93a42eb36b4f136ec46bd3ce834 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 13 Apr 2011 15:52:17 +0000
+Subject: [PATCH 115/200] PR middle-end/48591
+ * omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
+ NULL.
+ (expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.
+
+ * gcc.dg/gomp/pr48591.c: New test.
+
+ * testsuite/libgomp.c/pr48591.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172381 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index c3f2178..5b0fdff 100644
+--- a/gcc/omp-low.c
++++ b/gcc/omp-low.c
+@@ -5005,6 +5005,8 @@ expand_omp_atomic_fetch_op (basic_block load_bb,
+ return false;
+
+ decl = built_in_decls[base + index + 1];
++ if (decl == NULL_TREE)
++ return false;
+ itype = TREE_TYPE (TREE_TYPE (decl));
+
+ if (direct_optab_handler (optab, TYPE_MODE (itype)) == CODE_FOR_nothing)
+@@ -5056,6 +5058,8 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
+ edge e;
+
+ cmpxchg = built_in_decls[BUILT_IN_VAL_COMPARE_AND_SWAP_N + index + 1];
++ if (cmpxchg == NULL_TREE)
++ return false;
+ type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (addr)));
+ itype = TREE_TYPE (TREE_TYPE (cmpxchg));
+
+new file mode 100644
+index 0000000..e6cb106
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/gomp/pr48591.c
+@@ -0,0 +1,22 @@
++/* PR middle-end/48591 */
++/* { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */
++/* { dg-options "-fopenmp" } */
++
++extern void abort (void);
++
++int
++main ()
++{
++ __float128 f = 0.0;
++ int i;
++ #pragma omp parallel for reduction(+:f)
++ for (i = 0; i < 128; i++)
++ f += 0.5Q;
++ if (f != 64.0Q)
++ abort ();
++ #pragma omp atomic
++ f += 8.5Q;
++ if (f != 72.5Q)
++ abort ();
++ return 0;
++}
+new file mode 100644
+index 0000000..18dfd7f
+--- /dev/null
++++ b/libgomp/testsuite/libgomp.c/pr48591.c
+@@ -0,0 +1,22 @@
++/* PR middle-end/48591 */
++/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* } } */
++/* { dg-options "-fopenmp" } */
++
++extern void abort (void);
++
++int
++main ()
++{
++ __float128 f = 0.0;
++ int i;
++ #pragma omp parallel for reduction(+:f)
++ for (i = 0; i < 128; i++)
++ f += 0.5Q;
++ if (f != 64.0Q)
++ abort ();
++ #pragma omp atomic
++ f += 8.5Q;
++ if (f != 72.5Q)
++ abort ();
++ return 0;
++}
+--
+1.7.0.4
+