diff options
author | Tom de Vries <tom@codesourcery.com> | 2018-02-07 10:37:55 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-02-07 10:37:55 +0000 |
commit | c31bc4ac378f56593caae12bba086a98d002bb64 (patch) | |
tree | dfa3bfa19dcae0483c3e1882e6aa1463d0f22550 /gcc/omp-expand.c | |
parent | 26a823f03b214ce8412c4a255e483cc81c315bb4 (diff) | |
download | gcc-c31bc4ac378f56593caae12bba086a98d002bb64.zip gcc-c31bc4ac378f56593caae12bba086a98d002bb64.tar.gz gcc-c31bc4ac378f56593caae12bba086a98d002bb64.tar.bz2 |
[openacc] Fix diff_type in expand_oacc_collapse_init
2018-02-07 Tom de Vries <tom@codesourcery.com>
PR libgomp/84217
* omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
enough.
* c-c++-common/goacc/pr84217.c: New test.
* gfortran.dg/goacc/pr84217.f90: New test.
* testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
From-SVN: r257443
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r-- | gcc/omp-expand.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 90e0631..bb20490 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -1433,6 +1433,8 @@ expand_oacc_collapse_init (const struct omp_for_data *fd, plus_type = sizetype; if (POINTER_TYPE_P (diff_type) || TYPE_UNSIGNED (diff_type)) diff_type = signed_type_for (diff_type); + if (TYPE_PRECISION (diff_type) < TYPE_PRECISION (integer_type_node)) + diff_type = integer_type_node; if (tiling) { |