aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-06-16 07:47:15 +0000
committerTom de Vries <vries@gcc.gnu.org>2019-06-16 07:47:15 +0000
commitf45ce17d98fad556e0b534f9a478f5f602c0ad48 (patch)
tree5b821801cb9880bae3a5f827f3b288ea8c4f4615 /libgomp
parenta328e008e860ab7ca75de7d3c55eb83d24849e73 (diff)
downloadgcc-f45ce17d98fad556e0b534f9a478f5f602c0ad48.zip
gcc-f45ce17d98fad556e0b534f9a478f5f602c0ad48.tar.gz
gcc-f45ce17d98fad556e0b534f9a478f5f602c0ad48.tar.bz2
[openacc, parloops] Fix SIGSEGV in oacc_entry_exit_ok_1
When compiling the test-case with r268755, we run into a SIGSEGV in oacc_entry_exit_ok_1 when trying to dereference a NULL red: ... struct reduction_info *red; red = reduction_phi (reduction_list, use_stmt); tree val = PHI_RESULT (red->keep_res); ... Fix this by handling ref == NULL. Bootstrapped and reg-tested on x86_64. Build and reg-tested on x86_64 with nvptx accelerator. 2019-06-16 Tom de Vries <tdevries@suse.de> PR tree-optimization/89376 * tree-parloops.c (oacc_entry_exit_ok_1): Handle red == NULL. * testsuite/libgomp.oacc-c-c++-common/pr89376.c: New test. From-SVN: r272338
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/pr89376.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 131a415..827bab2 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-16 Tom de Vries <tdevries@suse.de>
+
+ PR tree-optimization/89376
+ * testsuite/libgomp.oacc-c-c++-common/pr89376.c: New test.
+
2019-06-15 Tom de Vries <tdevries@suse.de>
PR tree-optimization/89713
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr89376.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr89376.c
new file mode 100644
index 0000000..7f6c832
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr89376.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fno-tree-ch -fno-tree-dce -fno-tree-vrp" } */
+
+int
+main (void)
+{
+ int fa;
+
+ #pragma acc kernels
+ for (int rw = 0; rw < 1; ++rw)
+ fa = 0;
+
+ return 0;
+}
+