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

            Bug ID: 104126
           Summary: ICE in gfc_conv_gfc_desc_to_cfi_desc, at
                    fortran/trans-expr.c:5649
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Follow-up of pr103366, started between 20211017 and 20211024 :


$ cat z1.f90
program p
   use iso_c_binding, only: c_char
   call s(null())
contains
   subroutine s(x) bind(c)
      character(len=:, kind=c_char), pointer, intent(in) :: x
   end
end


$ gfortran-12-20220116 -c z1.f90
z1.f90:3:17:

    3 |    call s(null())
      |                 1
internal compiler error: in gfc_conv_gfc_desc_to_cfi_desc, at
fortran/trans-expr.c:5649
0x7dc7ae gfc_conv_gfc_desc_to_cfi_desc
        ../../gcc/fortran/trans-expr.c:5649
0x7e02b2 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.c:6336
0x81d120 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
        ../../gcc/fortran/trans-stmt.c:422
0x7a55f8 trans_code
        ../../gcc/fortran/trans.c:1984
0x7ce56e gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:7651
0x7513ce translate_all_program_units
        ../../gcc/fortran/parse.c:6651
0x7513ce gfc_parse_file()
        ../../gcc/fortran/parse.c:6938
0x79e33f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

Reply via email to