This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [openacc, committed] Fix diff_type in expand_oacc_collapse_init
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Thomas Schwinge <thomas at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Wed, 07 Feb 2018 20:37:00 +0100
- Subject: Re: [openacc, committed] Fix diff_type in expand_oacc_collapse_init
- Authentication-results: sourceware.org; auth=none
- References: <bb7615fb-d245-2037-ce5c-3427e06b1d6c@mentor.com>
Hi Tom,
> this patch fixes an 8 regression in an openacc testcase.
>
> The regression was introduced by r250925, a fix for PR78266, a bug in the
> handling of a loop with iteration variable type range smaller than the size
> of the parallel dimension the loop is assigned to.
>
> The fix for the regression is to apply the r250925 fix (in expand_oacc_for)
> to expand_oacc_collapse_init as well.
>
> Build and reg-tested on x86_64 with nvptx accelerator.
>
> Committed to stage4 trunk.
[...]
> * testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
this test FAILs when compiled as C++:
+FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/pr84217.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -O2 (test for excess errors)
+UNRESOLVED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/pr84217.c -DACC_DEVIC
E_TYPE_host=1 -DACC_MEM_SHARED=1 -O2 compilation failed to produce executable
Excess errors:
Undefined first referenced
symbol in file
abort() /var/tmp//ccSsAnFc.o
(seen on i386-pc-solaris2.11 and sparc-sun-solaris2.11).
Fixed as follows, tested with the appropriate runtest invocations,
installed on mainline.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libgomp.oacc-c-c++-common/pr84217.c (abort)
[__cplusplus]: Declare extern "C".
# HG changeset patch
# Parent e5c3e710215181503b228de2f9277e543392df2a
Fix libgomp.oacc-c-c++-common/pr84217.c for C++
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
@@ -1,4 +1,8 @@
-extern void abort (void);
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void abort (void);
#define N 10