This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/6] [GOMP4] OpenACC 1.0+ support in fortran front-end
- From: Tobias Burnus <burnus at net-b dot de>
- To: Ilmir Usmanov <i dot usmanov at samsung dot com>, Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Evgeny Gavrin <e dot gavrin at samsung dot com>, GarbuzovViacheslav <v dot garbuzov at samsung dot com>, Dmitri Botcharnikov <dmitry dot b at samsung dot com>, gcc-patches at gcc dot gnu dot org, jakub at redhat dot com, fortran at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 00:42:54 +0100
- Subject: Re: [PATCH 5/6] [GOMP4] OpenACC 1.0+ support in fortran front-end
- Authentication-results: sourceware.org; auth=none
- References: <52E158EF dot 9050009 at samsung dot com> <877g9pqmt2 dot fsf at schwinge dot name> <52E65B24 dot 9070403 at samsung dot com> <87iot5pgqb dot fsf at schwinge dot name> <52EB8437 dot 3060602 at samsung dot com> <52EB84C3 dot 4010407 at samsung dot com> <52EB8537 dot 4090708 at samsung dot com> <52EB8596 dot 2010808 at samsung dot com> <52EB85F7 dot 5020807 at samsung dot com> <52EB863B dot 3010501 at samsung dot com>
Some general questions to the patch set:
* I miss "-fopenacc". Is the support already in the branch? I assume
that part is then in c-family/c.opt fortran/lang.opt?
* Documentation: Do you also need to update fortran/gfortran.texi and/or
fortran/invoke.texi? (I assume that -fopenacc is already documented in
docs/invoke.texi) [Search for openmp to find possible spots.]
* Intrinsic module "openacc" and "openacc_lib.h": I assume that those
will be created as follow up - or do they already exist? If so, do you
need to document something in fortran/intrinsic.texi? Or in libgomp.texi?
Ilmir Usmanov wrote:
OpenACC 1.0 fortran FE support -- tests.
gcc/testsuite/gfortran.dg/goacc/
* goacc.exp: New test directory.
+++ b/gcc/testsuite/gfortran.dg/goacc/branch.f95
@@ -0,0 +1,55 @@
+! { dg-do compile }
+! { dg-options "-fopenacc" }
Is there a reason that you don't automatically add that flag via goacc.exp?
+! { dg-final { scan-tree-dump "pragma acc data" "original" } }
+! { dg-final { scan-tree-dump "if" "original" } }
This one looks rather general. Shouldn't use narrow it down a bit, e.g.
by using "scan-tree-dump-times"?
+! { dg-final { scan-tree-dump "to" "original" } }
+! { dg-final { scan-tree-dump "from" "original" } }
+! { dg-final { scan-tree-dump "alloc" "original" } }
Ditto. Also spaces before/after the pattern should make it more unique.
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/goacc.exp
@@ -0,0 +1,36 @@
+# Load support procs.
+load_lib gfortran-dg.exp
+
+if ![check_effective_target_fopenmp] {
+ return
+}
I assume that this should be indeed "fopenmp" here and not "fopenacc" as
both share libgomp?
+# Main loop.
+gfortran-dg-runtest [lsort \
+ [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] " -fopenacc -fdump-parse-tree"
As you use -fopenacc here, you probably can get rid of it in dg-options.
Can't you? I am not sure whether -fdump-parse-tree is needed; on the
other hand, it just clutters the *log files.
As -fopenmp seemingly can be mixed with -fopenacc, I think it would be
nice to have some test cases where !$omp and !$acc are both placed - in
either order - before the same Fortran statement.
Tobias