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

            Bug ID: 104429
           Summary: [9/10/11/12 Regression] ICE in gfc_conv_variable, at
                    fortran/trans-expr.cc:3056
           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: ---

Started between 20180826 and 20180902 :


$ cat z1.f90
module m
   type t
   contains
      procedure :: op
      procedure :: assign
      generic :: operator(*) => op
      generic :: assignment(=) => assign
   end type
contains
   function op (x, y)
      class(t), allocatable :: op
      class(t), intent(in) :: x
      real, intent(in) :: y
   end
   subroutine assign (z, x)
      type(t), intent(in) :: x
      class(t), intent(out) :: z
   end
end
program p
   use m
   class(t), allocatable :: x
   x = x * y
end


$ gfortran-8 -c z1.f90
$
$ gfortran-12-20220206 -c z1.f90
z1.f90:23:12:

   23 |    x = x * y
      |            1
interner Compiler-Fehler: in gfc_conv_variable, at fortran/trans-expr.cc:3056
0x7dc07f gfc_conv_variable
        ../../gcc/fortran/trans-expr.cc:3056
0x7d7fba gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.cc:9406
0x7e5102 get_proc_ptr_comp
        ../../gcc/fortran/trans-expr.cc:4176
0x7e5102 conv_function_val
        ../../gcc/fortran/trans-expr.cc:4215
0x7e5102 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.cc:7650
0x81f040 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
        ../../gcc/fortran/trans-stmt.cc:422
0x7a7043 trans_code
        ../../gcc/fortran/trans.cc:1995
0x7d037e gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:7654
0x7530ae translate_all_program_units
        ../../gcc/fortran/parse.cc:6651
0x7530ae gfc_parse_file()
        ../../gcc/fortran/parse.cc:6938
0x7a00af gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216

Reply via email to