https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70533
Bug ID: 70533 Summary: reductions on reference-typed variables are broken in OpenACC Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: openacc Severity: normal Priority: P3 Component: middle-end Assignee: cesar at gcc dot gnu.org Reporter: cesar at gcc dot gnu.org CC: tschwinge at gcc dot gnu.org Target Milestone: --- Target: x86_64-linux-gnu Created attachment 38181 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38181&action=edit reference reduction test case I see this error when I try to build the attached test case in trunk: reference-reduction.f90:5:0: !$acc parallel reduction(+:v1) copy(v1) internal compiler error: in lower_oacc_reductions, at omp-low.c:5589 0xd54cba lower_oacc_reductions /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:5589 0xd85065 lower_omp_target /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:16735 0xd86196 lower_omp_1 /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:17050 0xd86692 lower_omp /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:17143 0xd85db4 lower_omp_1 /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:16991 0xd86692 lower_omp /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:17143 0xd88482 execute_lower_omp /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:17878 0xd88526 execute /home/cesar/openacc/trunk/gcc-mainline/gcc/omp-low.c:17915 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. I posted a patch to fix this issue several months ago, but that patch was never reviewed <https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01476.html>. I'll rebase that patch and post it again.