]> git.ipfire.org Git - thirdparty/gcc.git/commit
[nvptx] Verify dimension limits after applying defaults
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jan 2019 10:27:12 +0000 (10:27 +0000)
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jan 2019 10:27:12 +0000 (10:27 +0000)
commit8c85bdaf79589a2848a43ac4a40c4333ac9134f1
tree68afdb459fee5d022c8ae35662e2aa2409f293d1
parenta2dadbcc8d1f2df4c07e16efeb5967b91d7d23da
[nvptx] Verify dimension limits after applying defaults

There's a problem in oacc_validate_dims that when f.i. the worker dimension
is set using -fopenacc-dim=:32, and the vector_length is set using a
"vector_length (128)" clause, the compiler combines, accepts and emits the
values, while the combination of the two is invalid.

The reason for this is that while oacc_validate_dims validates the dimensions
using targetm.goacc.validate_dims before applying default or minimum values,
it does not do so afterwards.

Work around this in the nvptx port by applying the defaults from
oacc_default_dims at the end of nvptx_goacc_validate_dims_1, as
oacc_validate_dims would do it, and then apply the dimensions limits.

2019-01-12  Tom de Vries  <tdevries@suse.de>

PR middle-end/88703
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Apply defaults
from oacc_default_dims, as oacc_validate_dims would do it, and apply
dimensions limits.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267877 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/nvptx/nvptx.c