From 4f0ae266e0a4b49ee029b37934fa952e0bd66b6d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 8 Apr 2009 22:04:45 +0200 Subject: re PR middle-end/39573 (Linking fails on AMD with -march=native and -fopenmp, works with generic x86_64) PR middle-end/39573 * omp-low.c (expand_omp_taskreg): Finalize taskreg static local_decls variables. * libgomp.c++/pr39573.C: New test. From-SVN: r145772 --- libgomp/ChangeLog | 5 +++++ libgomp/testsuite/libgomp.c++/pr39573.C | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 libgomp/testsuite/libgomp.c++/pr39573.C (limited to 'libgomp') diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 15eb2c6c..3a6a7ed 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2009-04-08 Jakub Jelinek + + PR middle-end/39573 + * libgomp.c++/pr39573.C: New test. + 2009-04-01 Jakub Jelinek PR other/39591 diff --git a/libgomp/testsuite/libgomp.c++/pr39573.C b/libgomp/testsuite/libgomp.c++/pr39573.C new file mode 100644 index 0000000..0167222 --- /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, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 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