diff options
author | Tom de Vries <tom@codesourcery.com> | 2017-08-07 17:06:11 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2017-08-07 17:06:11 +0000 |
commit | f4c222c0358dc0f9f6390e1eee1c6a9214f7f829 (patch) | |
tree | 75adc4e765783e7a1a3ac4a08c86f29481880c7c /gcc/omp-expand.c | |
parent | 58fccd6c21433d60c8ff41272c2edec0d4f39df7 (diff) | |
download | gcc-f4c222c0358dc0f9f6390e1eee1c6a9214f7f829.zip gcc-f4c222c0358dc0f9f6390e1eee1c6a9214f7f829.tar.gz gcc-f4c222c0358dc0f9f6390e1eee1c6a9214f7f829.tar.bz2 |
Fix diff_type in expand_oacc_for char iter_type
2017-08-07 Tom de Vries <tom@codesourcery.com>
PR middle-end/78266
* omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
* testsuite/libgomp.oacc-c-c++-common/vprop-2.c: New test.
* testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove xfail.
From-SVN: r250925
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 0a0098a..0f63507 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -5328,6 +5328,8 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd) } 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; basic_block entry_bb = region->entry; /* BB ending in OMP_FOR */ basic_block exit_bb = region->exit; /* BB ending in OMP_RETURN */ |