re PR fortran/64726 ([OpenACC] ICE with -fopenacc and reduction(+:a))
authorTobias Burnus <burnus@net-b.de>
Fri, 23 Jan 2015 07:01:34 +0000 (08:01 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 23 Jan 2015 07:01:34 +0000 (08:01 +0100)
2015-01-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/64726
        * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
        loop generation.

2015-01-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/64726
        * gfortran.dg/goacc/combined_loop.f90: New.

From-SVN: r220028

gcc/fortran/ChangeLog
gcc/fortran/trans-openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 [new file with mode: 0644]

index d2742c88f94b4b4afdf2d291101be6b60242096e..51d7b59e89051b032b1ff37e35ec10258f47faaa 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-23  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/64726
+       * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
+       loop generation.
+
 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/61933
index fe47a966108acf8faaee77f48e20964a188e384b..cdd1885262f4535d42c9f514eca2104f444d913f 100644 (file)
@@ -3438,7 +3438,7 @@ gfc_trans_oacc_combined_directive (gfc_code *code)
     pblock = &block;
   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
index 92076857cddfb400af92e02c7feb632b1a5adee8..20528c36138c670675ad1b3721e8b368c3857fab 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-23  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/64726
+       * gfortran.dg/goacc/combined_loop.f90: New.
+
 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        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 (file)
index 0000000..b8be649
--- /dev/null
@@ -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