]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenACC: fix privatization of by-reference arrays
authorTobias Burnus <tobias@codesourcery.com>
Wed, 3 Jun 2020 13:35:12 +0000 (15:35 +0200)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 9 Jun 2020 22:32:20 +0000 (15:32 -0700)
commitee4c727e509849e34239646afd9673c2ec509de5
tree6eacf57a8618a44b57aa2253e0f2aa170a7d782e
parentf05bd03d506a97aee5a2cfe7a026dc12f1171bc7
OpenACC: fix privatization of by-reference arrays

Replacing of a by-reference variable in a private clause by a local variable
makes sense; however, for arrays, the size is not directly known by the type.
This causes an ICE via create_tmp_var which indirectly invokes
force_constant_size in this case - but the latter only handled Ada.

gcc/ChangeLog:

        * gimplify.c (localize_reductions): Do not create local
variable for privatized arrays.

libgomp/ChangeLog:

        * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: New test.
gcc/gimplify.c
libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 [new file with mode: 0644]