PR c/48716
* gimplify.c (gimplify_bind_expr): Mark as GOVD_LOCAL also
TREE_STATIC variables declared inside of some OpenMP construct.
* gcc.dg/gomp/pr48716.c: New test.
* g++.dg/gomp/pr48716.C: New test.
From-SVN: r172859
+2011-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/48716
+ * gimplify.c (gimplify_bind_expr): Mark as GOVD_LOCAL also
+ TREE_STATIC variables declared inside of some OpenMP construct.
+
2011-04-22 Martin Jambor <mjambor@suse.cz>
PR middle-end/48585
struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
/* Mark variable as local. */
- if (ctx && !is_global_var (t)
+ if (ctx && !DECL_EXTERNAL (t)
&& (! DECL_SEEN_IN_BIND_EXPR_P (t)
|| splay_tree_lookup (ctx->variables,
(splay_tree_key) t) == NULL))
+2011-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/48716
+ * gcc.dg/gomp/pr48716.c: New test.
+ * g++.dg/gomp/pr48716.C: New test.
+
2011-04-22 Alexander Monakov <amonakov@ispras.ru>
PR c/36750
--- /dev/null
+// PR c/48716
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+int
+main (void)
+{
+ #pragma omp parallel default(none)
+ {
+ static int s;
+ int t = 0;
+ #pragma omp atomic
+ s++;
+ t++;
+ }
+ #pragma omp task default(none)
+ {
+ static int s;
+ int t = 0;
+ #pragma omp atomic
+ s++;
+ t++;
+ }
+}
--- /dev/null
+/* PR c/48716 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+int
+main (void)
+{
+ #pragma omp parallel default(none)
+ {
+ static int s;
+ int t = 0;
+ #pragma omp atomic
+ s++;
+ t++;
+ }
+ #pragma omp task default(none)
+ {
+ static int s;
+ int t = 0;
+ #pragma omp atomic
+ s++;
+ t++;
+ }
+}