* [gomp4] acc update bug
@ 2014-10-20 20:19 Cesar Philippidis
0 siblings, 0 replies; only message in thread
From: Cesar Philippidis @ 2014-10-20 20:19 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
The OpenACC update directive would cause an ICE if there was an error
parsing one of its clauses in the c front end. E.g. #pragma acc update
copy(a(1:10)). This patch fixes that. Also, it declare GOACC_update
inside libgomp_g.h
I've committed this patch to gomp-4_0-branch. A test case will be
provided later.
Cesar
[-- Attachment #2: bugfix-update.diff --]
[-- Type: text/x-patch, Size: 1200 bytes --]
2014-10-20 Cesar Philippidis <cesar@codesourcery.com>
gcc/c/
* c-parser.c (c_parser_oacc_update): Don't create a new stmt
if the pragma is bogus.
libgomp/
* (GOACC_update): Declare.
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 17085bf..d1956b8 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -12071,6 +12071,9 @@ c_parser_oacc_update (c_parser *parser)
return;
}
+ if (parser->error)
+ return;
+
tree stmt = make_node (OACC_UPDATE);
TREE_TYPE (stmt) = void_type_node;
OACC_UPDATE_CLAUSES (stmt) = clauses;
diff --git a/libgomp/libgomp_g.h b/libgomp/libgomp_g.h
index 44f200c..35b0627 100644
--- a/libgomp/libgomp_g.h
+++ b/libgomp/libgomp_g.h
@@ -225,6 +225,10 @@ extern void GOACC_kernels (int, void (*) (void *), const void *,
extern void GOACC_parallel (int, void (*) (void *), const void *,
size_t, void **, size_t *, unsigned short *,
int, int, int, int, int, ...);
+extern void GOACC_update (int device, const void *openmp_target, size_t mapnum,
+ void **hostaddrs, size_t *sizes,
+ unsigned short *kinds, int async,
+ int num_waits, ...);
extern void GOACC_wait (int, int, ...);
#endif /* LIBGOMP_G_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-20 20:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 20:19 [gomp4] acc update bug Cesar Philippidis
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).