From c146acedf5139830c2a4b10e1bedbb2addd53dff Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 23 Jan 2015 08:01:34 +0100 Subject: [PATCH] re PR fortran/64726 ([OpenACC] ICE with -fopenacc and reduction(+:a)) 2015-01-23 Tobias Burnus PR fortran/64726 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix loop generation. 2015-01-23 Tobias Burnus PR fortran/64726 * gfortran.dg/goacc/combined_loop.f90: New. From-SVN: r220028 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-openmp.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 | 12 ++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d2742c88f94..51d7b59e890 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-01-23 Tobias Burnus + + PR fortran/64726 + * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix + loop generation. + 2015-01-22 Jerry DeLisle PR fortran/61933 diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index fe47a966108..cdd1885262f 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -3438,7 +3438,7 @@ gfc_trans_oacc_combined_directive (gfc_code *code) pblock = █ else pushlevel (); - stmt = gfc_trans_omp_do (code, code->op, pblock, &loop_clauses, NULL); + stmt = gfc_trans_omp_do (code, EXEC_OACC_LOOP, pblock, &loop_clauses, NULL); if (TREE_CODE (stmt) != BIND_EXPR) stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0)); else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 92076857cdd..20528c36138 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-23 Tobias Burnus + + PR fortran/64726 + * gfortran.dg/goacc/combined_loop.f90: New. + 2015-01-22 Jerry DeLisle PR fortran/61933 diff --git a/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 b/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 new file mode 100644 index 00000000000..b8be6499937 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! +! PR fortran/64726 +! +subroutine oacc1() + implicit none + integer :: i + integer :: a + !$acc parallel loop reduction(+:a) ! { dg-excess-errors "sorry, unimplemented: directive not yet implemented" } + do i = 1,5 + enddo +end subroutine oacc1 -- 2.30.2