This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/66549] New: ICE on valid in OMP parallel region


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

            Bug ID: 66549
           Summary: ICE on valid in OMP parallel region
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: abensonca at gmail dot com
  Target Milestone: ---

The following causes an ICE with gfortran 6.0 (r224494):

module smfa
  type :: sgc
   contains
     procedure :: sla => sa
  end type sgc
  class(sgc), pointer :: sg_
  double precision, allocatable, dimension(:) :: vni 
contains
  double precision function sa(self,i)
    class(sgc), intent(in   ) :: self
  end function sa
  subroutine cvn(sg_,vn)
    class(sgc), intent(inout) :: sg_
    double precision, intent(  out), dimension(:) :: vn
    integer :: i
    do i=1,2
       vn(i)= sg_%sla(i)
    end do
  end subroutine cvn
  subroutine clwf()
    !$omp parallel
    call cvn(sg_,vni)
    !$omp end parallel
  end subroutine clwf
end module smfa

$ gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/gcc-trunk/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/gcc-trunk
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 6.0.0 20150615 (experimental) (GCC)

$ gfortran -c test2.F90 -O2 -fopenmp
test2.F90:12:0:

   subroutine cvn(sg_,vn)
^
internal compiler error: in create_component_ref_by_pieces_1, at
tree-ssa-pre.c:2585
0xcfb5bf create_component_ref_by_pieces_1
        ../../gcc-trunk/gcc/tree-ssa-pre.c:2585
0xcfb02f create_component_ref_by_pieces_1
        ../../gcc-trunk/gcc/tree-ssa-pre.c:2538
0xcfacb0 create_component_ref_by_pieces_1
        ../../gcc-trunk/gcc/tree-ssa-pre.c:2594
0xcfa40e create_component_ref_by_pieces
        ../../gcc-trunk/gcc/tree-ssa-pre.c:2735
0xcfa40e create_expression_by_pieces
        ../../gcc-trunk/gcc/tree-ssa-pre.c:2826
0xcfb875 insert_into_preds_of_block
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3025
0xcff1de do_regular_insertion
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3353
0xcff1de insert_aux
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3563
0xcfe807 insert_aux
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3573
0xcfe807 insert_aux
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3573
0xcfe807 insert_aux
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3573
0xd0126d insert
        ../../gcc-trunk/gcc/tree-ssa-pre.c:3596
0xd0126d execute
        ../../gcc-trunk/gcc/tree-ssa-pre.c:4864
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

If compiled with -O1 instead of -O2 a different ICE occurs:

$ gfortran -c test2.F90 -O1 -fopenmp
test2.F90:16:0:

     do i=1,2
^
internal compiler error: in make_decl_rtl, at varasm.c:1320
0xe3f385 make_decl_rtl(tree_node*)
        ../../gcc-trunk/gcc/varasm.c:1316
0x854c93 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc-trunk/gcc/expr.c:9489
0x861bbe expand_expr
        ../../gcc-trunk/gcc/expr.h:255
0x861bbe expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-trunk/gcc/expr.c:5130
0x755a95 expand_gimple_stmt_1
        ../../gcc-trunk/gcc/cfgexpand.c:3318
0x755a95 expand_gimple_stmt
        ../../gcc-trunk/gcc/cfgexpand.c:3414
0x757ebc expand_gimple_basic_block
        ../../gcc-trunk/gcc/cfgexpand.c:5426
0x75e846 execute
        ../../gcc-trunk/gcc/cfgexpand.c:6045
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

If compiled without -fopenmp compilation is successful.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]