diff mbox

[gomp4] OpenACC / C++

Message ID 87lhobt58a.fsf@schwinge.name
State New
Headers show

Commit Message

Thomas Schwinge Oct. 20, 2014, 10:17 a.m. UTC
Hi!

On Thu, 16 Oct 2014 19:38:23 +0200, I wrote:
> On Wed, 15 Oct 2014 11:21:05 -0500, James Norris <jnorris@codesourcery.com> wrote:
> > This patch adds OpenACC support to C++ in the gomp4 branch.
> 
> We understand that there will be further patches required on top of this,
> but we shall work on that incrementally.

One such patch I have just applied in r216456: »Enable compiler testing
for OpenACC/C++«.

There are several FAILs that need to be addressed.  As appropriate,
rework the source code, adjust some dg-* directives' regular expressions
a little bit (the diagnostic messages of C and C++ should typically be
very similar), and perhaps add some »{ target c }« or »{ target c++ }« to
the dg-* directives.  If test cases truly are appropriate for C but not
for C++, then they should be moved out of c-c++-common into the respecive
C-only directory.

commit 8f75331ca65b10331dbade6f35504af6447f5853
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Oct 20 10:11:38 2014 +0000

    Enable compiler testing for OpenACC/C++.
    
    	gcc/testsuite/
    	* gcc.dg/goacc/sb-1.c: Move file...
    	* c-c++-common/goacc/sb-1.c: ... here.
    	* gcc.dg/goacc/sb-2.c: Move file...
    	* c-c++-common/goacc/sb-2.c: ... here.
    	* gcc.dg/goacc/sb-3.c: Move file...
    	* c-c++-common/goacc/sb-3.c: ... here.
    
    	* g++.dg/goacc-gomp/goacc-gomp.exp: New file.
    	* g++.dg/goacc/goacc.exp: Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@216456 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog.gomp                       | 12 ++++++++
 .../{gcc.dg => c-c++-common}/goacc/sb-1.c          |  0
 .../{gcc.dg => c-c++-common}/goacc/sb-2.c          |  0
 .../{gcc.dg => c-c++-common}/goacc/sb-3.c          |  0
 gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp     | 36 ++++++++++++++++++++++
 gcc/testsuite/g++.dg/goacc/goacc.exp               | 35 +++++++++++++++++++++
 6 files changed, 83 insertions(+)



Grüße,
 Thomas
diff mbox

Patch

diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp
index 48651ad..10232bc 100644
--- gcc/testsuite/ChangeLog.gomp
+++ gcc/testsuite/ChangeLog.gomp
@@ -1,3 +1,15 @@ 
+2014-10-20  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* gcc.dg/goacc/sb-1.c: Move file...
+	* c-c++-common/goacc/sb-1.c: ... here.
+	* gcc.dg/goacc/sb-2.c: Move file...
+	* c-c++-common/goacc/sb-2.c: ... here.
+	* gcc.dg/goacc/sb-3.c: Move file...
+	* c-c++-common/goacc/sb-3.c: ... here.
+
+	* g++.dg/goacc-gomp/goacc-gomp.exp: New file.
+	* g++.dg/goacc/goacc.exp: Likewise.
+
 2014-10-09  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* gcc.dg/goacc/collapse.c: Move file to
diff --git gcc/testsuite/gcc.dg/goacc/sb-1.c gcc/testsuite/c-c++-common/goacc/sb-1.c
similarity index 100%
rename from gcc/testsuite/gcc.dg/goacc/sb-1.c
rename to gcc/testsuite/c-c++-common/goacc/sb-1.c
diff --git gcc/testsuite/gcc.dg/goacc/sb-2.c gcc/testsuite/c-c++-common/goacc/sb-2.c
similarity index 100%
rename from gcc/testsuite/gcc.dg/goacc/sb-2.c
rename to gcc/testsuite/c-c++-common/goacc/sb-2.c
diff --git gcc/testsuite/gcc.dg/goacc/sb-3.c gcc/testsuite/c-c++-common/goacc/sb-3.c
similarity index 100%
rename from gcc/testsuite/gcc.dg/goacc/sb-3.c
rename to gcc/testsuite/c-c++-common/goacc/sb-3.c
diff --git gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp
new file mode 100644
index 0000000..ca42de4
--- /dev/null
+++ gcc/testsuite/g++.dg/goacc-gomp/goacc-gomp.exp
@@ -0,0 +1,36 @@ 
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Load support procs.
+load_lib g++-dg.exp
+
+if { ![check_effective_target_fopenacc] \
+     || ![check_effective_target_fopenmp] } {
+  return
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+g++-dg-runtest [lsort [concat \
+	[find $srcdir/$subdir *.C] \
+	[find $srcdir/c-c++-common/goacc-gomp *.c]]] "" "-fopenacc -fopenmp"
+
+# All done.
+dg-finish
diff --git gcc/testsuite/g++.dg/goacc/goacc.exp gcc/testsuite/g++.dg/goacc/goacc.exp
new file mode 100644
index 0000000..1889a86
--- /dev/null
+++ gcc/testsuite/g++.dg/goacc/goacc.exp
@@ -0,0 +1,35 @@ 
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Load support procs.
+load_lib g++-dg.exp
+
+if ![check_effective_target_fopenacc] {
+  return
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+g++-dg-runtest [lsort [concat \
+	[find $srcdir/$subdir *.C] \
+	[find $srcdir/c-c++-common/goacc *.c]]] "" "-fopenacc"
+
+# All done.
+dg-finish