diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 09:26:25 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 09:26:25 +0000 |
commit | a4890dc9771057032da0a0fbfd0e336e10e4f591 (patch) | |
tree | 45d911a5091949c7b0cf5a010ff1cbc43fcb128a /libgomp/testsuite/libgomp.c++ | |
parent | ebba2dc7d266c2eae9bb0a1d75bceb041fa1d759 (diff) | |
download | gcc-a4890dc9771057032da0a0fbfd0e336e10e4f591.tar.gz |
PR middle-end/35185
* omp-low.c (lower_regimplify, init_tmp_var, save_tmp_var): Removed.
(lower_omp_2): New function.
(lower_omp_1, lower_omp): Rewritten.
* testsuite/libgomp.c++/pr35185.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/libgomp.c++')
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr35185.C | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/pr35185.C b/libgomp/testsuite/libgomp.c++/pr35185.C new file mode 100644 index 00000000000..f22c7720787 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr35185.C @@ -0,0 +1,33 @@ +// PR middle-end/35185 +// { dg-do run } + +extern "C" void abort (); + +struct S +{ + S () : s (6) {} + ~S () {} + int s; +}; + +__attribute__((noinline)) +bool +bar (S s) +{ + return s.s != 6; +} + +int +main () +{ + S s; + int err = 0; +#pragma omp parallel shared (s) + { + if (bar (s)) + #pragma omp atomic + err++; + } + if (err) + abort (); +} |