public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64726] New: [OpenACC] ICE with -fopenacc and reduction(+:a)
@ 2015-01-22  9:54 burnus at gcc dot gnu.org
  2015-01-22 12:33 ` [Bug fortran/64726] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-01-22  9:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64726

            Bug ID: 64726
           Summary: [OpenACC] ICE with -fopenacc and reduction(+:a)
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openacc
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: cesar at codesourcery dot com, tschwinge at gcc dot gnu.org

Found when looking at gcc/testsuite/gfortran.dg/goacc/coarray.f95 and PR63861.

The following program ICEs with "gfortran -fopenacc" but compiles with
"-fopenmp"; the ICE is:
internal compiler error: in gfc_trans_omp_do, at fortran/trans-openmp.c:3380


subroutine oacc1()
  implicit none
  integer :: i
  integer  :: a
  !$acc parallel loop reduction(+:a)
  !$omp parallel do reduction(+:a)
  do i = 1,5
  enddo
end subroutine oacc1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64726] [OpenACC] ICE with -fopenacc and reduction(+:a)
  2015-01-22  9:54 [Bug fortran/64726] New: [OpenACC] ICE with -fopenacc and reduction(+:a) burnus at gcc dot gnu.org
@ 2015-01-22 12:33 ` burnus at gcc dot gnu.org
  2015-01-23  7:02 ` burnus at gcc dot gnu.org
  2015-01-23  7:07 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-01-22 12:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64726

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Patch, lightly tested. (The test case will later fail in gimplify.c with
"sorry, not implemented".)

(In the function below, only op == EXEC_OACC_PARALLEL_LOOP or op ==
EXEC_OACC_KERNELS_LOOP are permitted [otherwise: assert].)

--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -3440,3 +3440,3 @@ gfc_trans_oacc_combined_directive (gfc_code *code)
     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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64726] [OpenACC] ICE with -fopenacc and reduction(+:a)
  2015-01-22  9:54 [Bug fortran/64726] New: [OpenACC] ICE with -fopenacc and reduction(+:a) burnus at gcc dot gnu.org
  2015-01-22 12:33 ` [Bug fortran/64726] " burnus at gcc dot gnu.org
@ 2015-01-23  7:02 ` burnus at gcc dot gnu.org
  2015-01-23  7:07 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-01-23  7:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64726

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Fri Jan 23 07:01:34 2015
New Revision: 220028

URL: https://gcc.gnu.org/viewcvs?rev=220028&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gfortran.dg/goacc/combined_loop.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-openmp.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/64726] [OpenACC] ICE with -fopenacc and reduction(+:a)
  2015-01-22  9:54 [Bug fortran/64726] New: [OpenACC] ICE with -fopenacc and reduction(+:a) burnus at gcc dot gnu.org
  2015-01-22 12:33 ` [Bug fortran/64726] " burnus at gcc dot gnu.org
  2015-01-23  7:02 ` burnus at gcc dot gnu.org
@ 2015-01-23  7:07 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-01-23  7:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64726

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED (on the GCC 5 trunk).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-23  7:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22  9:54 [Bug fortran/64726] New: [OpenACC] ICE with -fopenacc and reduction(+:a) burnus at gcc dot gnu.org
2015-01-22 12:33 ` [Bug fortran/64726] " burnus at gcc dot gnu.org
2015-01-23  7:02 ` burnus at gcc dot gnu.org
2015-01-23  7:07 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).