https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70357
Bug ID: 70357 Summary: [openacc][gomp4] ICE on reduction (+:sum) private (sum) Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- testcase: ... int main (void) { unsigned int sum = 0; #pragma acc parallel reduction (+:sum) private(sum) ; return 0; } ... ICE when compiling for openacc with gomp-4_0-branch: ... $ gcc -O2 -fopenacc private.c private.c: In function ‘main’: private.c:5:11: internal compiler error: Segmentation fault #pragma acc parallel reduction (+:sum) private(sum) ^~~ 0xf65b5a crash_signal src/gcc/toplev.c:335 0xd02bdb lookup_decl src/gcc/omp-low.c:1080 0xd15cb6 lower_oacc_reductions src/gcc/omp-low.c:5714 0xd4806b lower_omp_target src/gcc/omp-low.c:16978 0xd49240 lower_omp_1 src/gcc/omp-low.c:17301 0xd4976f lower_omp src/gcc/omp-low.c:17394 0xd48e49 lower_omp_1 src/gcc/omp-low.c:17242 0xd4976f lower_omp src/gcc/omp-low.c:17394 0xd48e49 lower_omp_1 src/gcc/omp-low.c:17242 0xd4976f lower_omp src/gcc/omp-low.c:17394 0xd4b743 execute_lower_omp src/gcc/omp-low.c:18129 0xd4b7e8 execute src/gcc/omp-low.c:18166 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. ... On trunk instead we get: ... private.c: In function ‘main’: private.c:5:34: error: ‘sum’ appears more than once in data clauses #pragma acc parallel reduction (+:sum) private(sum) ...