summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-08 20:04:45 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-08 20:04:45 +0000
commite1a7ccb9f5caeb23dbe6e7c124a8d4213e98328f (patch)
tree1f9294de165086bb00dcf11817a395d75138daaa /libgomp
parent7ca4e853ae1e881881bcce36edf100a37dba4691 (diff)
downloadgcc-e1a7ccb9f5caeb23dbe6e7c124a8d4213e98328f.tar.gz
PR middle-end/39573
* omp-low.c (expand_omp_taskreg): Finalize taskreg static local_decls variables. * libgomp.c++/pr39573.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c++/pr39573.C39
2 files changed, 44 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 15eb2c6c769..3a6a7edcafc 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/39573
+ * libgomp.c++/pr39573.C: New test.
+
2009-04-01 Jakub Jelinek <jakub@redhat.com>
PR other/39591
diff --git a/libgomp/testsuite/libgomp.c++/pr39573.C b/libgomp/testsuite/libgomp.c++/pr39573.C
new file mode 100644
index 00000000000..0167222bc68
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr39573.C
@@ -0,0 +1,39 @@
+// PR middle-end/39573
+// { dg-do run }
+
+int z;
+
+void __attribute__((noinline))
+bar (int *x)
+{
+ #pragma omp atomic
+ z += x[2];
+ x[2] += x[3];
+}
+
+int
+main ()
+{
+ int i;
+#pragma omp parallel for
+ for (i = 0; i < 65536; i++)
+ {
+ int x[] =
+ {
+ 0, 0, 0, 1, 0, 0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