http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50690

             Bug #: 50690
           Summary: ICE with front end optimization and OMP workshare
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: tkoe...@gcc.gnu.org


>From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50564#c8 :

Actually, I wonder in that case, how WORKSHARE will be handled, e.g.

implicit none
integer :: i
real :: A(5), B(5)
B(1) = 3.344
A = [real :: 1, 2, 3, 4, 5 ]
!$omp parallel default(shared)
!$omp workshare
A(:) = A(:)*cos(B(1))+A(:)*cos(B(1))
!$omp end workshare nowait
!$omp end parallel ! sync is implied here
print *, A
end


Answer: With -O, one gets an ICE:

omp.f90:7:0: internal compiler error: gfc_trans_omp_workshare(): Bad statement
code

Reply via email to