[Bug fortran/54990] New: [4.8 Regression] [OOP] ICE in tree_operand_check on SELECT TYPE

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 19 17:08:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54990

             Bug #: 54990
           Summary: [4.8 Regression] [OOP] ICE in tree_operand_check on
                    SELECT TYPE
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org
                CC: abensonca@gmail.com


Reported by Andrew Benson at
http://gcc.gnu.org/ml/fortran/2012-10/msg00094.html. Reduced test case:


program test
  implicit none

  type :: ncBhStd
  end type

  type :: tn
    class (ncBhStd), allocatable, dimension(:) :: cBh
  end type

  type(tn), target :: a

  select type (q => a%cBh(1))
  end select

end


Compiles cleanly with 4.7, but trunk gives the following ICE:


internal compiler error: tree check: expected class ‘expression’, have
‘declaration’ (var_decl) in tree_operand_check, at tree.h:4109
 program test
 ^
linux-vdso.so.1: No such file or directory
0xcf07be tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /home/jweil/gcc48/trunk/gcc/tree.c:8947
0x62d6a8 expr_check
        /home/jweil/gcc48/trunk/gcc/tree.h:3845
0x62d6a8 tree_operand_check
        /home/jweil/gcc48/trunk/gcc/tree.h:4109
0x62d6a8 gfc_get_vptr_from_expr(tree_node*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:199
0x667411 trans_associate_var
        /home/jweil/gcc48/trunk/gcc/fortran/trans-stmt.c:1256
0x66771c gfc_trans_block_construct(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-stmt.c:1319
0x5fb900 trans_code
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1412
0x5fbc62 gfc_trans_code(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1573
0x62add7 gfc_generate_function_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:5353
0x5fbca6 gfc_generate_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1590
0x59d211 translate_all_program_units
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4467
0x59d877 gfc_parse_file()
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4681
0x5e8900 gfc_be_parse_file
        /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:191



More information about the Gcc-bugs mailing list