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

            Bug ID: 92780
           Summary: [10 Regression] ICE in gfc_get_class_from_expr, at
                    fortran/trans-expr.c:484
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20190922 (silently accepted) and 20190929 (ICE) :


$ cat z1.f90
program p
   associate (y => p)
   end associate
end


$ gfortran-10-20190922 -c z1.f90
$
$ gfortran-10-20191201 -c z1.f90
z1.f90:2:0:

    2 |    associate (y => p)
      |
internal compiler error: tree check: expected class 'expression', have
'declaration' (function_decl) in tree_operand_check, at tree.h:3771
0x5ee034 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.c:9738
0x742f19 expr_check(tree_node*, char const*, int, char const*)
        ../../gcc/tree.h:3442
0x742f19 tree_operand_check(tree_node*, int, char const*, int, char const*)
        ../../gcc/tree.h:3771
0x742f19 gfc_get_class_from_expr(tree_node*)
        ../../gcc/fortran/trans-expr.c:484
0x79b4c2 trans_associate_var
        ../../gcc/fortran/trans-stmt.c:2099
0x7a1d51 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2282
0x706e17 trans_code
        ../../gcc/fortran/trans.c:1948
0x73e04d gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6798
0x6b80f6 translate_all_program_units
        ../../gcc/fortran/parse.c:6302
0x6b80f6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6541
0x7030ef gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to