public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47886] New: ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)
@ 2011-02-24 21:59 longb at cray dot com
  2011-02-24 22:38 ` [Bug fortran/47886] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: longb at cray dot com @ 2011-02-24 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: longb@cray.com


Test code:

!  derived from OpenMP test OMP3f/F03_2_7_1d.F90
program F03_2_7_1d
   use omp_lib
   implicit none
   integer, parameter :: NT = 4
   integer :: sum = 0

   call omp_set_num_threads(NT); 

   !$omp parallel
   !$omp task if(omp_get_num_threads() > 0)
   !$omp atomic
      sum = sum + 1
   !$omp end task
   !$omp end parallel
   if (sum /= NT) then
      print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
      stop 1;
   end if
end program F03_2_7_1d


> gfortran -fopenmp test.f90
test.f90: In function 'f03_2_7_1d':
test.f90:11:0: internal compiler error: in gfc_conv_expr_op, at
fortran/trans-expr.c:1368
Please submit a full bug report,


> gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/4.5.2/bin/../snos/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gcc/4.5.2/snos/libexec/gcc/x86_64-suse-linux/4.5.2/lto-wrapper
Target: x86_64-suse-linux

Same code fine with ifort:

> ifort -openmp test.f90
> ./a.out
>


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

end of thread, other threads:[~2011-02-27 16:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 21:59 [Bug fortran/47886] New: ICE: OpenMP !$omp task if(omp_get_num_threads() > 0) longb at cray dot com
2011-02-24 22:38 ` [Bug fortran/47886] " burnus at gcc dot gnu.org
2011-02-26 19:45 ` burnus at gcc dot gnu.org
2011-02-26 23:25 ` hjl.tools at gmail dot com
2011-02-27 12:44 ` jakub at gcc dot gnu.org
2011-02-27 14:39 ` burnus at gcc dot gnu.org
2011-02-27 14:40 ` burnus at gcc dot gnu.org
2011-02-27 17:11 ` 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).