* [gomp-3.1] Add a testcase for copyin of unallocated allocatable
@ 2011-07-12 14:08 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2011-07-12 14:08 UTC (permalink / raw)
To: gcc-patches
Hi!
The final standard now explicitly lists how copyin should copy allocatables.
Here is a testcase for something that hasn't been covered by the testsuite
yet.
2011-07-12 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/allocatable8.f90: New test.
--- libgomp/testsuite/libgomp.fortran/allocatable8.f90.jj 2011-07-12 15:42:56.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/allocatable8.f90 2011-07-12 15:45:00.000000000 +0200
@@ -0,0 +1,14 @@
+! { dg-do run }
+! { dg-require-effective-target tls_runtime }
+!$ use omp_lib
+
+ integer, save, allocatable :: a(:, :)
+ logical :: l
+!$omp threadprivate (a)
+ if (allocated (a)) call abort
+ l = .false.
+!$omp parallel copyin (a) num_threads (4) reduction(.or.:l)
+ l = l.or.allocated (a)
+!$omp end parallel
+ if (l.or.allocated (a)) call abort
+end
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-12 13:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 14:08 [gomp-3.1] Add a testcase for copyin of unallocated allocatable Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).