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

            Bug ID: 118441
           Summary: [15 Regression] [openmp] ICE with assignment of PACK
                    of string array
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

This appears to be a recent regression:

subroutine sub(s)
  character(len=*), intent(inout) :: s(:)
  integer :: n
  s( : ) =       s(:)                     ! OK
  n      = count(s(:) /= '')
  s(1:n) = pack (s(:), mask=(s(:) /= '')) ! ICE
end subroutine sub


% gfc-15 -c bug.f90 -fno-openmp  # OK
% gfc-15 -c bug.f90 -fopenmp
Im Durchlauf RTL: expand
bug.f90:6:47:

    6 |   s(1:n) = pack (s(:), mask=(s(:) /= '')) ! ICE
      |                                               ^
interner Compiler-Fehler: in expand_expr_real_1, bei expr.cc:11468
0x27ce324 internal_error(char const*, ...)
        ../../gcc-trunk/gcc/diagnostic-global-context.cc:517
0xa7bc54 fancy_abort(char const*, int, char const*)
        ../../gcc-trunk/gcc/diagnostic.cc:1722
0x8952cb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc-trunk/gcc/expr.cc:11468
0xe54827 store_expr(tree_node*, rtx_def*, int, bool, bool)
        ../../gcc-trunk/gcc/expr.cc:6771
0xe573c2 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-trunk/gcc/expr.cc:6492
0xe573c2 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-trunk/gcc/expr.cc:5980
0xd14fe8 expand_gimple_stmt_1
        ../../gcc-trunk/gcc/cfgexpand.cc:4283
0xd14fe8 expand_gimple_stmt
        ../../gcc-trunk/gcc/cfgexpand.cc:4364
0xd1631f expand_gimple_basic_block
        ../../gcc-trunk/gcc/cfgexpand.cc:6427
0xd18396 execute
        ../../gcc-trunk/gcc/cfgexpand.cc:7176

Reply via email to