+2011-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ 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.
+
2011-04-13 Bernd Schmidt <bernds@codesourcery.com>
* dwarf2out.c (struct dw_cfi_struct): Remove member dw_cfi_next.
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)
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));
2011-04-13 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/48591
+ * gcc.dg/gomp/pr48591.c: New test.
+
PR c++/48570
* g++.dg/cpp0x/constexpr-wstring1.C: New test.
* g++.dg/cpp0x/constexpr-wstring2.C: New test.
--- /dev/null
+/* 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;
+}
+2011-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/48591
+ * testsuite/libgomp.c/pr48591.c: New test.
+
2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/48135
--- /dev/null
+/* 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;
+}